3

I've been trying to install Paramiko in a Python 3.4 virtual environment. I tried pip installing, as well as easy_installing with pre-built binaries and neither worked. Suggested Here. Both kept saying that winrandom is not a valid Win32 application.

I found that is is a problem with PyCrypto, and not Paramiko directly, so I installed from source and pre-built binaries and still can't get it to find/use a module called winrandom.

Have any of you solved this problem? It's very frustrating.

Community
  • 1
  • 1
blakev
  • 4,154
  • 2
  • 32
  • 52
  • 2
    2.6.1 has a [relative import](https://github.com/dlitz/pycrypto/commit/10abfc8633bac653eda4d346fc051b2f07554dcd#diff-f14623ba167ec6ff27cbf0e005d732a7) that's fixed in 2.7. Probably all you need to do is fix that import in `Crypto\Random\OSRNG\nt.py`. – Eryk Sun May 20 '14 at 23:40
  • @eryksun thanks for finding that for me, I'll have to try it tomorrow. I was so frustrated I started back porting from 3.4 to 2.7 – blakev May 21 '14 at 00:44
  • yep, that's fixed it. @eryksun - maybe you should post it as an answer. So the question will can be closed! – beduin Jun 02 '14 at 09:12

3 Answers3

4

From the same link, change nt.py (...\Lib\site-packages\Crypto\Random\OSRNG\nt.py)

change

import winrandom

to

from . import winrandom 
mksteve
  • 12,614
  • 3
  • 28
  • 50
3

Not really sure if this is helpfull for you guys, but i got the problem that I was not able to install winrandom for python3.4

With the foolowing link, I fixed my problem https://github.com/dlitz/pycrypto/commit/10abfc8633bac653eda4d346fc051b2f07554dcd

1

2.6.1 has a relative import that's fixed in 2.7. Probably all you need to do is fix that import in Crypto\Random\OSRNG\nt.py

Andrew Breksa
  • 308
  • 2
  • 19