1. 安装

进入页面Start Locally | PyTorch 勾选对应选项
image.png

pip3 install torch torchvision torchaudio
# 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(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))) - skipping

原因: python 官网被墙了

python安装pip install报错Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirm_SevenBerry的博客-CSDN博客

解决:使用国内镜像.
好用的是豆瓣;【加上 --trusted-host xxx.com
-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
其他镜像:

- 豆瓣 (douban) http://pypi.douban.com/simple/
- 阿里云 http://mirrors.aliyun.com/pypi/simple/
- 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
- 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

C3BVSB7JBBW@VBO}{D7~MOX.png

最后修改:2022 年 12 月 05 日
如果觉得我的文章对你有用,请随意赞赏