当前位置:网站首页>pytorch installation error
pytorch installation error
2022-08-03 09:34:00 【Nanlu Seventeen】
纠正
安装pytorch
The first thing to do is to create a virtual environment:conda activate pytorch
从(base)->(pytorch)

结果出现错误
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/cloud/conda-forge/noarch/repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')])")))'))
Because of normal installationpytorchis to be added later-c pytorch 的,But I originally wanted to use Tsinghuayuan here
这里输入
conda config --set show_channel_urls yes让condaTell us which mirror source to use when downloading
之后输入conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch开始安装,The result is an error

原因可能是:Tsinghua source is wrong,找到C:\Users\Administrator文件下的.condarcThe file will be changed to :
channels:
- defaults
show_channel_urls: true
default_channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: http://mirr
输入:conda config --add channels conda-forge
之后再在Anaconda prompt中输入conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch 就安装成功了,
判断是否安装成功
输入pip list 出现

或者输入python,之后输入import torch If no error is reported, the installation is successful
边栏推荐
猜你喜欢

命令行加载特效 【cli-spinner.js】 实用教程

DOM0、DOM2、DOM3 事件

STP普通生成树安全特性— bpduguard特性 + bpdufilter特性 + guard root 特性 III loopguard技术( 详解+配置)

MySQL_关于JSON数据的查询

深度学习之 10 卷积神经网络2

播放量暴涨2000w+,单日狂揽24w粉,内卷的搞笑赛道还有机会

Mysql OCP 28题

LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之二:编码实现

【LeetCode】226.翻转二叉树

10分钟带你入门chrome(谷歌)浏览器插件开发
随机推荐
浅聊缓存函数
When deleting a folder, the error "Error ox80070091: The directory is not empty" is reported. How to solve it?
Oracle数据库表空间整理回收与释放操作
MySql的初识感悟,以及sql语句中的DDL和DML和DQL的基本语法
【LeetCode】112. Path sum
mysql8安装步骤教程
Does setting the following sysctl settings require a system reboot?
Promise 二:关键问题
系统io统计
软体按摩机器人驱动器的设计与仿真
基于二次型性能指标的燃料电池过氧比RBF-PID控制
多媒体数据处理实验3:图像特征提取与检索
MySQL_关于JSON数据的查询
For heavy two-dimensional arrays in PHP
Validate floating point input
【LeetCode】101. Symmetric Binary Tree
Automated test browser driver download version
行业 SaaS 微服务稳定性保障实战
Oracle 数据如何迁移到MySQL 图文详细教程
ClickHouse 数据插入、更新与删除操作 SQL