我试图跟着this tutorial走,结果被卡住了。以下是我遵循的步骤:
conda create -n test py2exe -c sasview
,它安装了python3.4.5-0、py2exe0.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还不适用于python3.5,而且conda似乎知道它并安装了python3.4。在
我错过了什么?在
执行
conda create -n test py2exe -c silg2
将安装pytnon3.4.5而不是最新的3.5.2,这使我认为conda知道哪个版本可以与py2exe一起工作。显然这不是真的。在这是有效的:
使用
conda list
显示两个环境中具有相同版本的相同包,但py2exe仅在由pip安装时有效,而在conda安装时则不起作用。在相关问题 更多 >
编程相关推荐