簡體   English   中英

Python 3.7 pip install - 系統找不到指定的路徑

[英]Python 3.7 pip install - The system cannot find the path specified

我在 Windows 10 筆記本電腦上使用 Python 3.7 (Activestate)。 一切正常,直到我嘗試使用 pip 安裝包(任何包)。 在命令提示符下,輸入“pip install anyPackage”時出現錯誤 - “系統找不到指定的路徑。” 沒有其他解釋或細節。

Python 安裝在“C:\\Python37”中,該位置在控制面板 > 系統 > 環境變量 > 用戶變量中列出。

在 Environment Variables > System Variables 我有: C:\\Python37\\ C:\\Python37\\DLLs\\ C:\\Python37\\Script\\ C:\\Python37\\Tools\\ C:\\Python37\\Tools\\ninja\\

關於如何擺脫該錯誤並使 pip 工作的任何建議?

非常感謝大家

簡短:確保 pip.exe 和 python.exe 從同一位置運行。 如果沒有(可能是由於 PATH 環境變量),只需刪除您不需要的那個。

更長:運行 pip install 時,檢查它嘗試獲取 python 的位置例如,在我自己的計算機中,它是:

pip install 啟動器中的致命錯誤:無法使用“c:\\program files\\python39\\python.exe”“C:\\Program Files\\Python39\\Scripts\\pip.exe”創建進程':系統找不到指定的文件.

然后我跑了:'where python.exe' //得到了幾個路徑。 'where pip.exe' // 有不同的路徑。

刪除了我不使用的那個。 瞧。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM