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?