Reputation: 33
I'm working on a SFTP module in python, and have been using Paramiko and Pycrypto (i'm an amateur programmer, bear with me experts). I am building it in 2.7, but the error it gives me doesn't make sense to me because I have all the necessary dependencies:
>>> import paramiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\paramiko\__init__.py", line 69, in <module
>
from transport import SecurityOptions, Transport
File "C:\Python27\lib\site-packages\paramiko\transport.py", line 32, in <modul
e>
from paramiko import util
File "C:\Python27\lib\site-packages\paramiko\util.py", line 32, in <module>
from paramiko.common import *
File "C:\Python27\lib\site-packages\paramiko\common.py", line 98, in <module>
from Crypto import Random
ImportError: No module named Crypto
This baffles me because I have the correct and updated version of pycrypto and minigw installed:
>>>import crypto
>>>
Anyone care to give me a hand?
Upvotes: 3
Views: 2347
Reputation: 1319
Check inside your Lib\site-packages\pycrypto
folder. There might be a further Lib\site-packages\Crypto
. Copy/pasting Crypto
in with the rest of my installed packages did the trick for me.
Upvotes: 0
Reputation: 3070
To me, the problems seems to be that "paramiko" is trying to import the module "Crypto" (notice the capital letter), while you have a module named "crypto" installed.
Upvotes: 1