gpt4 book ai didi

Python easy_install 抛出 chmod 错误

转载 作者:可可西里 更新时间:2023-11-01 09:41:42 25 4
gpt4 key购买 nike

我正尝试使用来自 Getting Python and Fabric Installed on Windows 的指南在 Windows 7 上安装 Python Fabric .

为了安装 PyCrypto 和 Fabric,我按照指南中的建议使用了 easy_install,但都失败了,返回了一个 chmod 错误:

Using c:\python27\lib\site-packages\fabric-1.3.4-py2.7.egg  
Processing dependencies for fabric
Searching for pycrypto>=2.1,!=2.4
Reading http://pypi.python.org/simple/pycrypto/
Reading http://pycrypto.sourceforge.net
Reading http://www.amk.ca/python/code/crypto
Reading http://www.pycrypto.org/
Best match: pycrypto 2.5
Downloading http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.5.tar.gz
Processing pycrypto-2.5.tar.gz
Running pycrypto-2.5\setup.py -q bdist_egg --dist-dir c:\users\birgit\appdata\local\temp\easy_install-nzrlow\pycrypto-2.5\egg-dist-tmp-_pwkm4
The command "chmod" is spelled wrong or could not be found.

Traceback (most recent call last):
File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module> load_entry_point('setuptools==0.6c12dev-r88846', 'console_scripts', 'easy_install')()
File "C:\Python27\lib\site-packages\setuptools-0.6c12dev_r88846-py2.7.egg\setuptools\command\easy_install.py", line 1712, in main

[... lots and lots of lines... (if they are relevant, I'll post them)]

File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run()
File "setup.py", line 269, in run
RuntimeError: chmod error

我不太了解这个 chmod 东西,但我认为 Windows 中没有 chmod?

如何让 easy_install 真正起作用?

我发布了一个类似的问题here ,在那里(感谢@J.F. Sebastian)我找到了一个解决方法来安装那些没有结构的包。但现在我确实想知道如何真正解决我在使用 easy_install 时遇到的问题。

最佳答案

Download并安装 MinGW - Minimalist GNU for Windows

要使某些 Unix 命令可以从 Windows 控制台访问,请在您的 env 变量中设置:

C:\MinGW\bin;C:\MinGW\mingw32\bin;C:\MinGW\msys\1.0\bin;C:\MinGW\msys\1.0\sbin

.

或者,从控制台:

PATH=%PATH%;C:\MinGW\bin;C:\MinGW\mingw32\bin;C:\MinGW\msys\1.0\bin;C:\MinGW\msys\1.0\sbin 

关于Python easy_install 抛出 chmod 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9157759/

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