尝试安装 Python 模块时 GCC 权限被拒绝
我正在尝试安装此模块 http://pypi.python.org/pypi/winrandom/1.1 。因此,我提取 zip 文件的内容并尝试使用以下命令安装它:
python setup.py install
并收到此输出:
running install
running build
running build_ext
building 'winrandom' extension
c:\cygwin\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include
-IC:\Python27\PC -c src/winrandom.c -o build\temp.win32-2.7\Release\src\winrandom.o
error: command 'gcc' failed: Permission denied¨
我也尝试过使用 easy_install 但收到相同的错误。
输出中提到的 Python 文件夹是只读的,我怀疑这是导致问题的原因,但我无法更改只读属性。
编辑:还尝试以管理员身份运行
I'm trying to install this module http://pypi.python.org/pypi/winrandom/1.1. So I extract the content of the zip-file and try to install it with the command:
python setup.py install
And receives this output:
running install
running build
running build_ext
building 'winrandom' extension
c:\cygwin\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include
-IC:\Python27\PC -c src/winrandom.c -o build\temp.win32-2.7\Release\src\winrandom.o
error: command 'gcc' failed: Permission denied¨
I have also tried with easy_install but am receiving the same error.
The Python folders mentioned in the output are read-only and I suspect that it is what is causing the problem but I'm unable to change the read-only attribute.
Edit: Also tried running as administrator
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题可能是由于 cygwin 使用 gcc 和 g++ 的符号链接引起的,而 windows 不知道如何处理这个问题。快速测试是否如此:
请参阅此链接和<一个href="https://stackoverflow.com/questions/5033463/get-access-is-denied-when-trying-to-compile-with-g-from-command-line-cygwin">这个问题有关此问题的更多信息。
This problem may be caused by the fact that cygwin uses symlinks for gcc and g++, and windows doesn't understand how to handle this. A quick test to see if this is so is as follows:
See this link and this question for more information about this problem.