Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCC permission denied when trying to install Python module

Tags:

python

gcc

cygwin

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

like image 924
Nait Avatar asked Nov 22 '25 04:11

Nait


1 Answers

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.

like image 121
Nate Avatar answered Nov 24 '25 22:11

Nate



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!