2

I am using Python 2.7 on a Windows 7 x64 machine and need to install winrandom as its a dependency for paramiko. I cannot pip install due to sitting behind a proxy. Using this link https://pypi.python.org/pypi/winrandom/1.2 I have tried installing both the .exe and the .zip source.

The .exe windows installer crashes every time before succeeding. I suspect its because it is a 32 bit installer and I am on a 64 bit.

I can get the source files into the correct location but when I run python setup.py install I get the error gcc -mno-cygwin -mdll -O -Wall "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" -c src/winrandom.c -o build\temp.win32-2.7\Release\src\winrandom.o error: command 'gcc' failed: No such file or directory

I have also tried to easy_install.py. This built a .egg file in my Python27/Lib/site-packages/ directory but not the actual winrandom directory.

Per a couple stack overflow posts (No module named 'winrandom' when using pycrypto) I tried changing the import of winrandom from import winrandom to from . import winrandom but that didn't solve my issue either.

When running my script the error is still File "C:\Program Files (x86)\Python27\lib\site-packages\Crypto\Random\OSRNG\nt.py", line 28, in <module> from . import winrandom ImportError: cannot import name winrandom

Does anyone have any recommendations on how I can get winrandom installed?

Bill S.
  • 96
  • 7
  • The error `error: command 'gcc' failed: No such file or directory` looks like you did not install gcc (https://gcc.gnu.org/) – laolux Aug 09 '17 at 17:13
  • I was also hoping to avoid installing gcc, this machine isn't exactly meant to have much software installed on it so I'm trying to find as bare bones of a solution as possible. – Bill S. Aug 09 '17 at 18:29
  • Well, but if you want to use the source files then you need some compiler to turn them into executable files and libraries... Maybe you could try and compile and install on a seperate computer and then copy everything over. gcc is not needed to run the modules, only to compile them. – laolux Aug 09 '17 at 18:50
  • That's good to know. Do you know if there is another way of getting gcc without using cygwin on windows? – Bill S. Aug 14 '17 at 12:57
  • You could try MinGW (http://mingw.org/) or maybe change the scripts to use some Microsoft compiler. I have only very limited experience with windows, so apart from that I am afraid I will be of no help. – laolux Aug 14 '17 at 13:07
  • I believe both cygwin and MinGW install packages via mirror sites online. Similar to initial problem, these wont make it thru the proxy I am stuck behind. I appreciate all the help and will see if I can install it on a different machine then send the compiled files to this machine. – Bill S. Aug 14 '17 at 13:10

0 Answers0