首先说遇到的问题
用网上下载的cx_Freeze-5.0.1.win-amd64-py3.5.exe安装,总是提示 Python version 3.5-32 is required,but is not found in registry!
后来我就改用pip安装
我安装软件习惯按照到D盘的program files下,结果就悲剧了,执行完python cxfreeze-postinstall这个命令,用cx_freeze -h验证时,一直提示D:\Program不是内部命令。
所以我卸载了Python,将Python重新安装在D盘根目录下, 然后按照下面的命令成功安装
pip install cx_freeze
安装完成后进入Scripts文件夹
执行
python cxfreeze-postinstall
最后在cmd窗口输入
cx_freeze -h
如果输出下面这些就代表成功了。
Usage: cxfreeze [options] [SCRIPT]
Freeze a Python script and all of its referenced modules to a base
executable which can then be distributed without requiring a Python
installation.
executable which can then be distributed without requiring a Python
installation.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-O optimize generated bytecode as per PYTHONOPTIMIZE; use
-OO in order to remove doc strings
-c, --compress compress byte code in zip files
-s, --silent suppress all output except warnings and errors
--base-name=NAME file on which to base the target file; if the name of
--version show program's version number and exit
-h, --help show this help message and exit
-O optimize generated bytecode as per PYTHONOPTIMIZE; use
-OO in order to remove doc strings
-c, --compress compress byte code in zip files
-s, --silent suppress all output except warnings and errors
--base-name=NAME file on which to base the target file; if the name of