Python easy_install抛出chmod

2024-05-23 01:25:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图使用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,但我以为窗户里没有chmod?

我怎样才能让安装简单到实际工作?

我提出了一个类似的问题here,在那里(多亏了@J.F.Sebastian),我找到了一个解决方法来安装那些没有结构的包。但现在我真的想知道,如何真正解决这个问题,我与简易安装。


Tags: installinpyhttpegglibdisteasy
3条回答

Download并安装MinGW - Minimalist GNU for Windows

要从windows控制台访问某些Unix命令,请在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 

以计算机管理员身份登录。chmod指的是访问目录的权限,在本例中,我感觉python在抱怨Windows 7的UAC(用户帐户控制)。在C:\中创建目录需要在Windows中提升权限。

如果在第269行有明显的事情发生,您可以编辑脚本以去掉有问题的行。

如果没有,您可以安装所有依赖项,并手动安装Fabric。

另外,考虑使用virtualenv和pip。

相关问题 更多 >

    热门问题