Python3.8安裝paramiko失敗:ERROR: Could not build wheels for pynacl, cryptography which use PEP 517 and cannot be installed directly


最近學習paramiko模塊,win10環境,Python3.8(重點,不說版本都是不講碼德)

使用pip install paramiko安裝失敗,報錯內容:ERROR: Could not build wheels for pynacl, cryptography which use PEP 517 and cannot be installed directly

 

最開始網上查詢解決辦法,嘗試了如下辦法:

1、安裝版本更高的的Microsoft Visual C++版本

2、手動下載並安裝pycrypto-2.6.1-cp36-cp36m-win_amd64.whl

(兩個辦法在其他地方都能查到步驟和安裝包,這里不再一一贅述)

但是按照這兩個辦法都不行!!!!使用辦法1后執行pip install paramiko仍舊報一樣的錯誤,使用辦法2則安裝whl都直接失敗。

 

然后我決定!!讀報錯信息!!終於被我讀到關鍵內容:

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

  To update pip, run:

      pip install --upgrade pip

  and then retry package installation.

 

然后我依據提示執行 pip install --upgrade pip

但是執行失敗!!報錯了!!

C:\Users\Administrator>pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl (2.1MB)
     |████████████████████████████████| 2.1MB 731kB/s
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒絕訪問。: 'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-uninstall-pqee65qd\\pip.exe'
Consider using the `--user` option or check the permissions.

 

注意這里抓住關鍵語句:'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-uninstall-pqee65qd\\pip.exe'

於是我進入到對應目錄下,然后發現了華點:這里有三個pip.exe

 

 

想到我的Python是3.8,於是我靈機一動,執行 pip3.8 install paramiko,然后就成功了!!!

 

 

問題根因待以后補充,這個事情讓我收獲最大的是學到了解決問題的思維。

 

 

 總結:

初學python,對各種模塊的安裝和使用都一知半解,在這個過程中,重要的不是問題和問題的解決方法,而是問題的解決思路和過程,以及解決問題的思維。

從現在起記錄下學習過程中有意義的案例和過程,心之所向,皆是遠方~

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM