解決 windows下安裝Anaconda后python pip不可用的情況


在windows系統下通過安裝Anaconda的方式安裝的python使用中發現不能再通過pip安裝python包。只能通過conda install packname 的方法,導致很多conda不支持的包無法安裝(我遇到的是 request)

解決方法:打開Anaconde prompt

                在該prompt中使用pip而不是命令行或者powershell中使用pip

               問題順利解決。

 例如:在命令行pip install dlib                  報錯

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

 

         在Anaconde prompt  運行          pip install requests 順利安裝完成

Requirement already satisfied: requests in e:\anaconda\lib\site-packages (2.21.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in e:\anaconda\lib\site-packages (from requests) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in e:\anaconda\lib\site-packages (from requests) (2018.11.29)
Requirement already satisfied: idna<2.9,>=2.5 in e:\anaconda\lib\site-packages (from requests) (2.8)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in e:\anaconda\lib\site-packages (from requests) (1.24.1)

 

 


免責聲明!

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



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