Python easy_install 抛出 chmod 错误
我正在尝试使用 在 Windows 上安装 Python 和 Fabric。
为了安装 PyCrypto 和 Fabric,我按照指南中的建议使用了 easy_install,但都失败了,返回 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
我对这个 chmod-thing 不太了解,但我认为 Windows 中没有 chmod?
我怎样才能让 easy_install 真正起作用?
我在这里发布了一个类似的问题(感谢@JF Sebastian) )我找到了一种解决方法,可以在没有结构的情况下安装这些软件包。但现在我确实想知道如何真正解决我在使用 easy_install 时遇到的问题。
I'm trying to install Python Fabric on Windows 7 using the guide from Getting Python and Fabric Installed on Windows.
To install PyCrypto and Fabric, i used easy_install, as recommended in the guide, but both failed, returning 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
I don't know much about this chmod-thing, but I thought there is no chmod in Windows?
How can i get easy_install to actually work?
I postet a similar question here, where (thanks to @J.F. Sebastian) I found a workaround to install those packages without fabric. But now I do want to know, how to actually solve the problem I'm having with easy_install.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
下载并安装
MinGW - 适用于Windows的极简GNU
。要使某些 Unix 命令可以从 Windows 控制台访问,请在
env
变量中设置:。
或者,从控制台:
Download and install
MinGW - Minimalist GNU for Windows
.To making some Unix commands accessible from the windows console, set in your
env
variables:.
Alternatively, from the console:
以计算机管理员身份登录。
chmod
指的是访问目录的权限,在这种情况下,我有一种感觉 python 正在抱怨 Windows 7 的 UAC(用户帐户控制)。在C:\
中创建目录需要在 Windows 中提升权限。Log in as the administrator of your machine.
chmod
refers to permissions for accessing directories, and in this case, I have a feeling python is complaining about Windows 7's UAC (user account control). Creating directories inC:\
requires elevated permissions in Windows.如果第 269 行发生明显的情况,您可以编辑脚本以删除有问题的行。
如果没有,您可以安装所有依赖项,然后手动安装 Fabric。
另外,考虑使用 virtualenv 和 pip。
If there's something obvious happening at line 269, you could just edit the script to take out the offending line.
If not, you could install all of the dependencies, and manually install Fabric.
Also, consider using virtualenv and pip.
我可以看到你使用的是 Python 2.x。因此,我将建议对我有用的方法。
从以下位置下载 Pycrypto 安装程序:此处 。
然后执行通常的步骤。选择要安装的 Lib/Site-packages,我安装了两个 Python(Python 2 和 3,因此我选择了 Python 2/Lib/Site-packages)。
走到最后。
安装成功后,打开 IDLE 并输入:
如果没有任何错误,那么就可以开始了。
干杯。
注意:我使用的是 Windows 8 机器。
I can see that you are on a Python 2.x. Thus, I will suggest the method that worked for me.
Download the Pycrypto installer from : Here.
Then do the usual steps. Select the Lib/Site-packages in which you want to install it, I had two Python installations (Python 2 and 3, thus I selected Python 2/Lib/Site-packages).
Go till the end.
After successful installation, open the IDLE and type:
If it works without any error, you are good to go.
Cheers.
Note : I am on a windows 8 machine.