gpt4 book ai didi

Python安装setuptools,ez_setup.py报错

转载 作者:太空狗 更新时间:2023-10-30 00:36:25 25 4
gpt4 key购买 nike

我正在尝试在 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。

最佳答案

您打算如何运行和安装它?理想情况下.. 运行 cmd 然后 cd 到提取的文件夹并运行 python setup.py install 这应该安装它.. 如果你在 64 位 Windows 上使用 64 位 python 那么你需要获得适当的版本可以是在这里找到:(http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools)

关于Python安装setuptools,ez_setup.py报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18320925/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com