ImportError exception encountered while trying to use Fabric
Question: I am using Ubuntu and virtualenv, and I am having this recurring problem,
while attempting to use Fabric to create a deployment script. Fabric depends
on paramiko, which depends on PyCrypto.

Each time I try to use Fabric, or PyCrypto directly, I get this error:

    
    
    ImportError: cannot import name Random
    

I have tried reinstalling with pip install -U PyCrypto. I have also tried
installing the python-crypto and python-crypto-dbg packages with Aptitude, to
no avail. I still get the same error. Anyone have any ideas that might help me
solve this problem? Thanks in advance!


Answer: It's possible that there's a file name collision in your the directory from
which you're running Fabric. Do you have a file called `Crypto.py` in your
project?

Can you get Crypto.Random to import from outside of your project directory?
(but still using your virtualenv. Ipython is a big help here.)

