简体   繁体   中英

How can i install paramiko module?

I tried to install paramiko module (with easy_install) on windows but i got following message :

GMP or MPIR library not found not building crypto.publickey._fastmath
setup script exited with error: command 'gcc' failed permission denied

I tried install using cygwin but this time paramiko had installed in python of cygwin. I have tried to use this python, program is not running because of it doesnt see my packages. I dont understand its reason. Can I install python 2.7 on cygwin and how can i provide to recognise to my packages? or Is it possible installing paramiko module directly on windows?

Recently, I came across a situation where I had to do some ssh related work on Windows. Paramiko is a great option and honestly one of the viable options, besides of course, Twisted. I still haven't waded those waters in Windows but a tutorial on that is due in some time ;)

Please keep in mind to ensure you download the relevant versions matching your python installation and Windows version (32 or 64). This goes without saying that you will need Python to be installed. Check this link: Download Python here

  1. Download paramiko for windows. You get the zip file: Paramiko for windows

  2. To build it you need the dependency package pycrypto. Again keep in mind you will need a matching version of pycrypto for your Python. This is a built version of Windows so no install is required. Check here

  3. You could do an easy_install by downloading setuptools but I ran into some issues so I chose to download MinGW tool. This is again an installation and no build is required. Available here

  4. Once you have pycrypto and MinGW installed on your windows machine, just browse to the folder where you extracted the paramiko module from the zip file and issue this command: python setup.py build --compiler=mingw32 bdist_wininst TADA! You are all set to use ssh on your windows machine with Python.

For demo scripts check out the demo folder in paramiko or for documentation here: Click here

The simplest way is installing Active Python and use PyPM to install Paramiko. No compilation is needed.

I installed Active Python and problem is resolved. I followed steps on this blog for installing pycrypto and python :

http://apprenticealf.wordpress.com/2011/01/14/windows-python-ebooks-and-drm/

Thanks for helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM