ImportError: No module named 'winrandom'
Had problem on Windows 7 and Python 3.5.2 (64bit) when importing simplecrypt the system complained: ImportError: No module named 'winrandom' Seems to be coming from Crypto.Random.random import getrandbits
Anyway as suggested here by @neRok00 following solved situation for me:
Problem is solved by editing string in crypto\Random\OSRNG\nt.py: import winrandom to from . import winrandom
ok, thanks. that's a problem in crypto, so i can't alter it, but i'll add a comment in the docs.
I got a solution :
you should try this at nt.py under site-packages\Crypto\Random\OSRNG
from :
importwinrandom
to :
fromCrypto.Random.OSRNGimportwinrandom
It should be at line 28
It worked perfectly fine afterwards. It might not work with other versions of python ( idk ) , but it will definitely work in 3.7 or 3.8
- I'm just 11 yrs old and a full stack developer