日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【pip报错】Could not fetch URL https://pypi.org/simple/gast/:There was a problem confirming the ssl cert

發布時間:2023/12/29 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【pip报错】Could not fetch URL https://pypi.org/simple/gast/:There was a problem confirming the ssl cert 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

pip install -r requirements.txt

問題1:

【報錯】Could not fetch URL https://pypi.org/simple/gast/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceed with url: /simple/gast/ (Caused by SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)) - skipping

【原因】國內無法直接訪問到pypi,加了豆瓣的源之后就解決了被墻的問題。

【解決方案】

pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

問題2

【報錯】ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

【原因】pip使用更新的問題,按照它推薦的來。

【解決方案】

pip install -r requirements.in -i http://pypi.douban.com/simple --trusted-host pypi.douban.com --use-feature=2020-resolver

問題3

【報錯】Requirement already satisfied: xxx in c:\anaconda3\lib\site-packages
【原因】最初我以為是包都下載好了,后來發現Settings里邊解釋器里并沒有相關依賴,而且requirement.txt的文件里的還是標黃的。這才發現系統里有的,和現在項目所處的虛擬環境不一樣。
【解決方案】
【錯誤方案】我找到報錯提示的目錄下,把這里所有包都復制到python解釋器所在目錄下的/lib/site-packeges里。
【正確方案】

pip install -r requirments --target=

問題4

因為問題3錯誤解決方案的不嚴謹,致使出現了新的問題:
【報錯】ImportError: cannot import name ‘InvalidSchemeCombination’
from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
【原因】在直接復制到目標目錄下時,有一些文件收到了影響使其損壞,其中就有pip。
【解決方案】
1.先找到目標目錄【項目使用的python解釋器所在目錄下的/lib/site-packeges】,找到pip相關文件夾全部刪除。
2.強行刪除pip

conda remove --force pip

3.下載pip

conda install -c anaconda pip

【最終使用pip下載不報錯的命令行】

pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com --use-feature=2020-resolver --target=D:\ProgramData\Anaconda3\envs\tensorflow\Lib\site-packages

總結

以上是生活随笔為你收集整理的【pip报错】Could not fetch URL https://pypi.org/simple/gast/:There was a problem confirming the ssl cert的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。