开发者

GCC permission denied when trying to install Python module

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开发者_StackOverflow:\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


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:

C:\>g++
Access is denied.

C:\>bash

$ ls -l /usr/bin/g++
lrwxrwxrwx 1 nate Domain Users 21 Mar 22  2010 /usr/bin/g++ -> /etc/alternatives/g++

$ g++
g++: no input files

See this link and this question for more information about this problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜