Win7 x64安装Paramiko出问题

今天上午windows下配置paramiko环境时出现问题,随手记录下来。
 
先说一下我的环境:
win7 x64 旗舰版、Python3.5.0、pip8.1.0
pip install paramiko时报错如下:
大概意思:
blablabla...
反正大概意思就是少GMP or MPIR?
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
上面的问题貌似是C++版本低导致pycrypto安装不成功?(我也不知道,Google一上午都让我装Visual c++)
翻了好多Stack Overflow的答案。。。最后找到一个:
用下面的链接安装解决:(From:=>Github:https://github.com/sfbahr/PyCrypto-Wheels
pip install --use-wheel --no-index --find-links=https://github.com/sfbahr/PyCrypto-Wheels/raw/master/pycrypto-2.6.1-cp35-none-win_amd64.whl pycrypto
用上面的方式安装pycrypto之后
再使用 pip install paramiko
看到上面的图显示安装成功了。。。
But...
import paramiko的时候又报错了。。。(囧。。。我的一上午啊!!!) 
 Google到一个解决方法如下,亲测有效:(From:=>Github:https://github.com/dlitz/pycrypto/pull/46
打开:%PythonHome%\Python35\Lib\site-packages\Crypto\Random\OSRNG\nt.py 文件
将28行按下面修改:
import winrandom ==> from Crypto.Random.OSRNG import winrandom 
问题最终解决:
 
转载请注明出处,谢谢。
posted @ 2016-03-06 10:03  Q1mi  阅读(1076)  评论(0编辑  收藏  举报