How to Install Paramiko and PyCrypto in Mac OS X the Easy Way

Paramiko is an SSH module for python that allows for secure connections to be made, and pycrypto is a cryptography toolkit for python. Whether you need one or the other, or both, the easiest way to get them both installed through Mac OS X is through paramiko.  No need to use HomeBrew, MacPorts, or any funky installers, you can do the entire thing yourself rather quickly. If you have no idea what I’m talking about, you probably don’t need any of this.


Xcode 4.3 (App Store link) or later installed including Command Line Tools or install GCC and Command Line Tools without Xcode
Get Paramiko (or whatever the newest version is), this package includes PyCrypto
It is absolutely critical that gcc and the OS X command line tools are installed before beginning the installation process. Trying to build and install paramiko and pycrypto will fail with a variety of errors ranging from “autoconf error” to “ImportError: No module named Crypto” – if you encounter either of those errors it’s because Xcode’s command line tools are not installed yet.

Installing paramiko and pycrypto

Assuming you have GCC and python installed in OS X now, here’s the incredibly simple installation process:

  • Unzip the Paramiko archive and cd to that directory
  • Type the following command:
sudo easy_install ./

That’s it.  If you have the dependencies the install process is extremely quick.

You must be logged in to post a comment.

Proudly powered by WordPress   Premium Style Theme by
WordPress Appliance - Powered by TurnKey Linux