2012-10-06

solution to ImportError: No module named OSRNG

i was trying to run fab bootstrap on my windows machine an received the error: "ImportError: No module named OSRNG"

i found a folder on my computer called C:\PythonX\ that had the package i needed.  i merged the contents of this folder with my python installation in "C:\Program Files (x86)\python27\"

in the end, you need to have a folder like this, but with the location to your python installation:
C:\Program Files (x86)\python27\Lib\site-packages\Crypto\Random\OSRNG

1 comment:

  1. This sounds like a problem with your PYTHONPATH, which tells python where to search for modules, most likely because your python installation is in a nonstandard location. Moving the module files themselves is one way to solve the problem. You could also append the module location to sys.path but that would need to be done every time the interpreter is loaded, or you could define a custom PYTHONPATH environment variable in windows (semi permanant).
    See python documentation for more details

    ReplyDelete