【发布时间】:2012-02-26 05:29:15
【问题描述】:
我正在尝试使用来自Getting Python and Fabric Installed on Windows 的指南在 Windows 7 上安装 Python Fabric。
到目前为止我做了什么:
- 已将Python 2.7 安装到 C:\Python27
- 将 Python 目录和 Python/脚本添加到 Windows 系统路径
- 已安装SetupTools
- 已安装MinGW
- 将 MinGW 目录添加到系统路径
- Modified the distutils.cfg 匹配 MinGW-Path
到目前为止,这似乎工作正常。当我尝试通过easy_install Fabric 安装Fabric 时,它开始下载文件,但随后我得到一个chmod error。
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
有解决问题的建议吗?
【问题讨论】:
-
您是否尝试过来自非官方 Windows 二进制文件的 Python 扩展包的二进制安装程序:Base distribution may contain Fabric。
-
非官方的 Windows 二进制文件帮助解决了所描述的问题!谢谢!
-
我遇到了与 PyCrypto 相同的问题,并按照this question 中的建议使用binary installer 再次解决了它 - 现在终于可以运行 Python Fabric 脚本了!
标签: python windows-7 fabric easy-install