[ Python - 15 ] win7安裝paramiko問題總匯

來源:互聯網
上載者:User

標籤:app   pack   find   mat   UI   char   site   name   appdata   

安裝環境:

  win7 sp1 python3.5 安裝paramiko

 

新裝的win7 sp1 x64位系統,安裝好python3.5和pycharm後,需要用到paramiko模組於是開始安裝:

>>pip install paramiko

報錯:

warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmath

 

各種百度:
    有些教程說是要安裝VS2008,安裝MinGW, 嘗試了下安裝不成功。

    於是有找到了一種辦法,因為是在安裝Crypto的時候報錯,安裝PyCrypto 第三方版,如下:

>>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

 

第三方版本安裝完畢後,再次:

>>pip install paramiko 

成功。

但是在 import paramiko的時候報錯:

ImportError: No module named ‘winrandom‘

 

處理辦法:修改python3安裝目錄下的 lib/Crypto/Random/OSRNG/nt.py 檔案中找到(如果python3.5是預設安裝目錄為:C:\Users\Administrator\AppData\Local\Programs\Python\Python35\Lib\site-packages\Crypto\Random\OSRNG\nt.py)

import winrandom修改為from Crypto.Random.OSRNG import winrandom

 

再次 import paramiko 終於成功。

[ Python - 15 ] win7安裝paramiko問題總匯

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.