[英]Problems installing Python Fabric on Windows 7
I'm trying to install Python Fabric on Windows 7 using the guide from Getting Python and Fabric Installed on Windows . 我正在尝试使用Windows上的获取Python和Fabric安装指南在Windows 7上安装Python Fabric。
What i did so far: 到目前为止我做了什么:
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
. 当我尝试通过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
Any suggestions to solve the problem? 有什么建议可以解决问题吗?
I have just managed to install fabric on win7 box, using information from various places in the net. 我刚刚设法在win7盒子上安装了fabric,使用来自网络中各个地方的信息。 That was really annoying, so just to save others frustration I put together the following list. 这真的很烦人,所以为了挽救别人的挫折,我把以下列表放在一起。
pip install fabric
- you'll get errors, some stuff about missing bat files, etc. while installing pycrypto. 从命令行pip install fabric
运行 - 在安装pycrypto时,你会收到错误,一些关于丢失bat文件等的东西。 pip install fabric
- this time everything seems to be ok, until you try to run fabric script. 从命令行pip install fabric
再次运行 - 这次一切似乎都没问题,直到你尝试运行结构脚本。 It will complain about "No module named win32api", etc. 它会抱怨“没有名为win32api的模块”等。 And you are done, fabric should work ok. 你完成了,面料应该工作正常。
您是否尝试过非扩展的软件包扩展包的非官方Windows二进制文件中的二进制安装程序: 基本分发可能包含Fabric 。
If you're using virtualenv, you need to add one point to Piotr Kochanski's answer: when creating the virtualenv, allow it to access the system packages so it can see pycrypto. 如果您正在使用virtualenv,您需要在Piotr Kochanski的答案中添加一点:在创建virtualenv时,允许它访问系统包,以便它可以看到pycrypto。 By default it disallows this. 默认情况下,它不允许这样做。
These steps worked for me: 这些步骤对我有用:
Create a virtual env that can access the system packages. 创建可以访问系统包的虚拟环境。 For example: 例如:
c:\\Python27\\Scripts\\virtualenv.exe --system-site-packages c:\\Proj\\virtualenv
pip install fabric
1.Create a virtualenv (I usually put all mine on the desktop) 1.创建一个virtualenv(我通常把我的全部放在桌面上)
2.Download the binary of pycrypto (matching your installed python version and architecture -- no support for python3 as of now) - http://www.voidspace.org.uk/python/modules.shtml 2.下载pycrypto的二进制文件(匹配你安装的python版本和架构 - 截至目前不支持python3) - http://www.voidspace.org.uk/python/modules.shtml
3.Navigate to the easy_install executable (under Lib\\site-packages) within the virtualenv folder you created and run the pycrypto install - 'easy_install C:\\path\\to\\the\\download\\pycrypto-2.6.win-amd64-py2.7.exe' 3.导航到您创建的virtualenv文件夹中的easy_install可执行文件(在Lib \\ site-packages下)并运行pycrypto install - 'easy_install C:\\ path \\ to \\ the \\ download \\ pycrypto-2.6.win-amd64-py2。 7.exe”
4.Activate the virtualenv and 'pip install fabric' 4.激活virtualenv和'pip install fabric'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.