我正在尝试在Windows上安装setuptools 文档说我应该运行ez_setup.py 所以我做了,我得到以下输出:
Extracting in c:\users\ut601039\appdata\local\temp\tmpf6a2mb
Now working in c:\users\ut601039\appdata\local\temp\tmpf6a2mb\setuptools-1.0
Installing Setuptools
Something went wrong during the installation.
See the error message above.
Traceback (most recent call last):
File "D:\Python\Setuptools\ez_setup.py", line 357, in <module>
sys.exit(main())
SystemExit: 2
错误消息不是很有用。查看我发现的代码:
if not _python_cmd('setup.py', 'install', *install_args):
log.warn('Something went wrong during the installation.')
log.warn('See the error message above.')
# exitcode will be 2
return 2
我去了_python_cmd()
并找到了:
def _python_cmd(*args):
args = (sys.executable,) + args
return subprocess.call(args) == 0
我发现subprocess.call(args)
返回1而不是预期的0.
答案 0 :(得分:11)
你打算如何运行&amp;安装吗?理想情况下...运行cmd然后cd到提取的文件夹&amp;运行python setup.py install
这应该安装它..如果你在64位python的64位窗口,那么你需要得到适当的版本可以在这里找到:(http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools)