在Windows 7上安装Python Fabric时出现问题 [英] Problems installing Python Fabric on Windows 7

查看:173
本文介绍了在Windows 7上安装Python Fabric时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用我到目前为止所做的:

  • Installed Python 2.7 to C:\Python27
  • Added the Python-Directory and Python/Scripts to the Windows System Paths
  • Installed SetupTools
  • Installed MinGW
  • Added MinGW-Directory to the System Path
  • Modified the distutils.cfg to match the MinGW-Path

到目前为止,这似乎还可以正常工作.当我尝试通过easy_install Fabric安装Fabric时,它开始下载文件,但是随后我得到了chmod error.

This seemed to work fine until now. When I try to install Fabric via easy_install Fabric it starts to download the files, but then i get an 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  

有解决问题的建议吗?

推荐答案

我刚刚使用来自网络中各个位置的信息设法将结构安装在win7盒上.真的很烦人,所以为了节省其他人的沮丧,我整理了以下清单.

I have just managed to install fabric on win7 box, using information from various places in the net. That was really annoying, so just to save others frustration I put together the following list.

  1. 安装pip http://www.pip-installer.org/en/最新的/index.html (很简单,按照网站上的指南进行操作,不会出现问题)
  2. 从命令行pip install fabric运行-安装pycrypto时,您会收到错误消息,一些有关丢失bat文件的信息等.
  3. http://www.voidspace.org.uk/downloads/下载预编译的pycrypto软件包a> (针对您的Python版本)(例如2.7)为
  4. http://sourceforge.net/projects/pywin32/files/中安装缺少的win32api pywin32/-首先选择一个构建版本(可能是最新版本),然后再次选择适用于您的Python版本的.exe文件.
  1. Install pip http://www.pip-installer.org/en/latest/index.html (that's easy, follow the guide on the web site, goes without problems)
  2. run from command line pip install fabric - you'll get errors, some stuff about missing bat files, etc. while installing pycrypto.
  3. Download precompiled pycrypto package from http://www.voidspace.org.uk/downloads/ for your version of Python, for instance for 2.7 it is http://www.voidspace.org.uk/downloads/pycrypto-2.1.0.win32-py2.7.zip
  4. run again from command line pip install fabric - this time everything seems to be ok, until you try to run fabric script. It will complain about "No module named win32api", etc.
  5. Install that missing win32api from http://sourceforge.net/projects/pywin32/files/pywin32/ - first choose a build version (newest, probably) and then again .exe file for your Python version.

您完成了,布料应该可以正常工作了.

And you are done, fabric should work ok.

这篇关于在Windows 7上安装Python Fabric时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆