2
我尝试生成应用程序可执行文件时遇到此问题。我按照这个example这样的设置代码将cx_freeze找不到python 3 path mac
application_title = "app_name" #what you want to application to be called
main_python_file = "main.py" #the name of the python file you use to run the program
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
includes = ["atexit","re"]
setup(
name = application_title,
version = "0.1",
description = "Sample cx_Freeze PyQt4 script",
options = {"build_exe" : {"includes" : includes }},
executables = [Executable(main_python_file, base = base)])
然后我去我的终端和按
python setup.py bdist_mac
出于某种原因,我不知道该怎么解决,我得到这个输出,和它不生成的文件
running bdist_mac
running build
running build_exe
copying /Applications/anaconda/lib/python3.4/site-packages/cx_Freeze/bases/Console -> build/exe.macosx-10.5-x86_64-3.4/main
copying /opt/local/Library/Frameworks/Python.framework/Versions/3.4/Python -> build/exe.macosx-10.5-x86_64-3.4/Python
error: [Errno 2] No such file or directory: '/opt/local/Library/Frameworks/Python.framework/Versions/3.4/Python'
我已经安装了Python 3.4和cx_freeze的anaconda。有什么建议么?
不出现问题相似,有什么用PyQt的,相反,它似乎是cx_feeze没有找到Python的正确安装。 v4.3.3的发行说明指出,某些OSX路径解决问题已得到解决。如果你不使用cx_freeze 4.3.3,我会建议更新! – 2014-11-23 08:27:25
我已经安装了cx_freeze 4.3.3软件包,还有什么? '@ three_pineapples' – tcassanelli 2014-11-23 17:16:46
@tcassanelli您是否找到任何解决方案? – ayyayyekokojambo 2015-01-08 17:54:15