Skip to content Skip to sidebar Skip to footer

No Module Named 'winrandom' When Using Pycrypto

I already spent 2 days trying to install pyCrypto for Paramiko module. So, first issue I had faced was this: >>> import paramiko Traceback (most recent call last): File

Solution 1:

Problem is solved by editing string in crypto\Random\OSRNG\nt.py:

import winrandom

to

from . import winrandom

Solution 2:

Super easy fix for ImportError: No module named 'winrandom' - this is where python is located on my Windows 10 system:

C:\Users\Charles\AppData\Local\Programs\Python\Python35

But you have to go further to find the right file to update, so go here:

C:\Users\Charles\AppData\Local\Programs\Python\Python35\Lib\site-packages\Crypto\Random\OSRNG\nt.py

Open the nt.py in any text editor and change just the line near the top:

import winrandom

should be:

from . import winrandom

Save the file - re-run what you were originally trying to run and you should be good. Hope this helps someone!


Post a Comment for "No Module Named 'winrandom' When Using Pycrypto"