I am using python 3.4 at win-8. I want to obtain .exe program from python code. I learned that it can be done by cx_Freeze.
我在win-8使用python 3.4。我想从python代码获取.exe程序。我了解到它可以通过cx_Freeze来完成。
In MS-DOS command line, I wrote pip install cx_Freeze to set up cx_Freeze. It is installed but it is not working.
在MS-DOS命令行中,我写了pip install cx_Freeze来设置cx_Freeze。它已安装但无法正常工作。
(When I wrote cxfreeze to command line, I get this warning:C:\Users\USER>cxfreeze 'cxfreeze' is not recognized as an internal or external command,operable program or batch file.)
(当我将cxfreeze写入命令行时,我收到此警告:C:\ Users \ USER> cxfreeze'cxfreeze'未被识别为内部或外部命令,可运行程序或批处理文件。)
(I also added location of cxfreeze to "PATH" by environment variables)
(我还通过环境变量将cxfreeze的位置添加到“PATH”)
Any help would be appriciated thanks.
任何帮助都会受到感谢。
3 个解决方案
#1
51
I faced a similar problem (Python 3.4 32-bit, on Windows 7 64-bit). After installation of cx_freeze, three files appeared in c:\Python34\Scripts\
:
我遇到了类似的问题(Python 3.4 32位,在Windows 7 64位上)。安装cx_freeze后,c:\ Python34 \ Scripts \中出现了三个文件:
cxfreeze
cxfreeze-postinstall
cxfreeze-quickstart
These files have no file extensions, but appear to be Python scripts. When you run python.exe cxfreeze-postinstall
from the command prompt, two batch files are being created in the Python scripts directory:
这些文件没有文件扩展名,但似乎是Python脚本。从命令提示符运行python.exe cxfreeze-postinstall时,将在Python脚本目录中创建两个批处理文件:
cxfreeze.bat
cxfreeze-quickstart.bat
From that moment on, you should be able to run cx_freeze.
从那一刻起,您应该能够运行cx_freeze。
cx_freeze was installed using the provided win32 installer (cx_Freeze-4.3.3.win32-py3.4.exe
). Installing it using pip gave exactly the same result.
使用提供的win32安装程序(cx_Freeze-4.3.3.win32-py3.4.exe)安装了cx_freeze。使用pip安装它会得到完全相同的结果。
#2
0
go to https://pypi.python.org/pypi?:action=display&name=cx_Freeze&version=4.3.4 and click the one you want to download :)
转到https://pypi.python.org/pypi?:action=display&name=cx_Freeze&version=4.3.4并单击要下载的:)
#3
-1
Make sure the Version of Python is correct, if you have more than one version on your computer, just simply type "python" in console to check the version of your python. I just had this problem earlier.
确保Python版本正确,如果您的计算机上有多个版本,只需在控制台中键入“python”即可检查python的版本。我刚才遇到了这个问题。
#1
51
I faced a similar problem (Python 3.4 32-bit, on Windows 7 64-bit). After installation of cx_freeze, three files appeared in c:\Python34\Scripts\
:
我遇到了类似的问题(Python 3.4 32位,在Windows 7 64位上)。安装cx_freeze后,c:\ Python34 \ Scripts \中出现了三个文件:
cxfreeze
cxfreeze-postinstall
cxfreeze-quickstart
These files have no file extensions, but appear to be Python scripts. When you run python.exe cxfreeze-postinstall
from the command prompt, two batch files are being created in the Python scripts directory:
这些文件没有文件扩展名,但似乎是Python脚本。从命令提示符运行python.exe cxfreeze-postinstall时,将在Python脚本目录中创建两个批处理文件:
cxfreeze.bat
cxfreeze-quickstart.bat
From that moment on, you should be able to run cx_freeze.
从那一刻起,您应该能够运行cx_freeze。
cx_freeze was installed using the provided win32 installer (cx_Freeze-4.3.3.win32-py3.4.exe
). Installing it using pip gave exactly the same result.
使用提供的win32安装程序(cx_Freeze-4.3.3.win32-py3.4.exe)安装了cx_freeze。使用pip安装它会得到完全相同的结果。
#2
0
go to https://pypi.python.org/pypi?:action=display&name=cx_Freeze&version=4.3.4 and click the one you want to download :)
转到https://pypi.python.org/pypi?:action=display&name=cx_Freeze&version=4.3.4并单击要下载的:)
#3
-1
Make sure the Version of Python is correct, if you have more than one version on your computer, just simply type "python" in console to check the version of your python. I just had this problem earlier.
确保Python版本正确,如果您的计算机上有多个版本,只需在控制台中键入“python”即可检查python的版本。我刚才遇到了这个问题。