当前位置:网站首页>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
边栏推荐
猜你喜欢
GO开发环境配置
深度学习之 10 卷积神经网络1
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之二:编码实现
Network LSTM both short-term and long-term memory
删除文件夹时,报错“错误ox80070091:目录不是空的”,该如何解决?
Oracle 迁移至Mysql
二叉查找树的插入
MySQL 免安装版的下载与配置教程
Scrapy + Selenium implements simulated login and obtains dynamic page loading data
go版本升级
随机推荐
Flink Yarn Per Job - Submit application
php中去重二维数组
mysql 事务原理详解
STP和RSTP的BPDU报文中flag位 对比+分析
013-二叉树
Apple Silicon配置二进制环境(二)
响应式布局经典范例——巨幅背景大标题
【LeetCode】622. Design Circular Queue
Redis和Mysql数据同步的两种方案
Redis和MySQL如何保持数据一致性
Mysql OCP 28题
PostgreSQL的架构
自动化测试浏览器驱动下载版本对应关系
RSTP(端口角色+端口状态+工作机制)|||| 交换机接口分析
长短期记忆网络 LSTM
Redis的基础与django使用redis
MySQL-DDL数据定义语言-约束
scala 并行集合、并行并发、线程安全问题、ThreadLocal
慢 SQL 分析与优化
MySQL 免安装版的下载与配置教程