本文介绍了如何在Linux中使用cx_freeze创建要在Windows中使用的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Linux中使用cx_freeze创建一个程序包,以便在Windows中使用.exe或.bin文件.我在linux上测试了cx_freeze,但该软件包在linux和Windows中的制作方式未知.

how to use cx_freeze in linux to create a one package to be used in windows like .exe or .bin file.I tested cx_freeze in linux but that make package for linux and in windows is unknown.

例如:

$ cxfreeze gui.py

这是制作的文件:

gui

仅在linux中运行.

that is running only in linux.

有什么方法可以使用cx_freeze制作exe或bin程序包?

Is there any way to use cx_freeze for making exe or bin package ?

还是使用其他替代cx_freeze的方法使一个bin文件在其他平台上独立执行?

Or any alternative way instead of cx_freeze to make one bin file to execute in other platform independent?

我使用python3(3.x).

I use python3(3.x).

推荐答案

我一直在尝试使cx_freeze在Windows上以各种可能的方式正常工作,但是没有运气...我正在尝试做您现在正在做的事情使用Ubuntu,但可悲的是,我发现了这一点: https://cx_freeze.readthedocs.org/en /latest/faq.html#problems-with-running-frozen-programs

I've been trying to get cx_freeze properly working on windows in every way possible but with no luck...I was trying to do what you are doing now using Ubuntu but I found this, sadly:https://cx_freeze.readthedocs.org/en/latest/faq.html#problems-with-running-frozen-programs

"冻结其他平台

cx_Freeze可在Windows,Mac和Linux上运行,但是在每个平台上,它只能生成在该平台上运行的可执行文件.因此,如果要冻结Windows程序,请在Windows上冻结它.如果要在Mac上运行,请在Mac上将其冻结.

cx_Freeze works on Windows, Mac and Linux, but on each platform it only makes an executable that runs on that platform. So if you want to freeze your program for Windows, freeze it on Windows; if you want to run it on Macs, freeze it on a Mac.

在紧要关头,您可以尝试使用Wine制作Windows可执行文件.我们的经验是,您需要在cx_Freeze运行后手动复制一些文件,以使可执行文件起作用.我们不建议您使用此选项."我猜唯一的选择就是尝试与葡萄酒一起做吗?你有运气吗?

At a pinch, you can try to make a Windows executable using Wine. Our experience is that you need to copy some files in manually after cx_Freeze has run to make the executable work. We don’t recommend this option."I guess the only option is to try doing it with wine?Have you had any luck?

这篇关于如何在Linux中使用cx_freeze创建要在Windows中使用的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 01:07