【发布时间】:2016-08-10 23:52:42
【问题描述】:
我尝试关注this tutorial,但被卡住了。这些是我遵循的步骤:
-
我安装了 Anaconda 32 位
-
我执行了
conda create -n test py2exe -c sasview,里面安装了Python 3.4.5-0、py2exe 0.9.2.2-py34_1等包 -
我创建了包含
print("Hello World!")的hello.py文件 -
我创建了
setup.py文件,其中包含:from distutils.core import setup import py2exe setup(console=['hello.py']) -
我执行了
activate test python setup.py py2exe
结果是:
running py2exe
1 missing Modules
------------------
? readline imported from cmd, code, pdb
Building 'dist\hello.exe'.
error: [Errno 2] No such file or directory: 'C:\\Anaconda3\\envs\\test\\lib\\site-packages\\py2exe\\run-py3.4-win32.exe'
缺少的模块只是一个警告,可以忽略(参见here)。
Py2exe 还不能用于 Python 3.5,看起来 conda 知道它并安装了 python 3.4。
我错过了什么?
【问题讨论】:
-
好吧,该文件在包的压缩包中不存在。通过在 Anaconda.org 上搜索,该频道 (
sasview) 中的 py2exe 版本似乎有些过时了。也许尝试使用silg2频道? -
我都试过了,结果都一样
标签: python python-3.x py2exe conda