0

I have an issue with installing paramiko.. I think It is installed correctly from pip and when I tried to do import paramiko... I got an error..

us159010:site-packages jaehokim00$ python
Python 2.6.9 (unknown, Jul 14 2015, 19:46:31) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.


 import paramiko
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "paramiko/__init__.py", line 30, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "paramiko/transport.py", line 49, in <module>
    from paramiko.dsskey import DSSKey
  File "paramiko/dsskey.py", line 26, in <module>
    from Crypto.PublicKey import DSA 
ImportError: No module named Crypto.PublicKey

I also reinstalled on pycrypto again. My python version is 2.6 and os is Mac OS 10.10.5

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
Larry
  • 41
  • 1
  • 4

3 Answers3

1

I got this somehow when I install crypto it shows crypto and paramiko is looking for Crypto

I had to change site-package directory for crypto to Crypto and it worked

Larry
  • 41
  • 1
  • 4
0

I have just got the same error message. I've solved it following these steps.

At its official doc says, paramiko needs pycrypto and ecdsa packages. to start with, you need python-dev package:

sudo apt-get install python-dev

Then install pycrypto. Here is the package download, it is better to choose the last release, build it an install it:

  • go to pycrypto extraction dir
  • python setup.py build
  • python setup.py install

Do the same thing for ecdsa, you can download it from here.

Here you go !

MrHanachoo
  • 109
  • 1
  • 6
0

As for me what worked in OS X is:

brew uninstall python brew install python pip install -r requirements.txt aka: pip install crypto pycrypto Fabric paramiko in terminal this was not the fastest strategy possibly but it did work.

Zargold
  • 1,892
  • 18
  • 24