当前位置:网站首页>pytorch安装错误
pytorch安装错误
2022-08-03 09:19:00 【南吕十七】
纠正
安装pytorch
首先要创建虚拟环境: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\')])")))'))
因为正常安装pytorch是后面要加-c pytorch 的,但是我这里本来是想用清华源的
这里输入
conda config --set show_channel_urls yes让conda告诉我们下载的时候用的哪个镜像源
之后输入conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch开始安装,结果出现以错误
原因可能是:清华源有误,找到C:\Users\Administrator文件下的.condarc文件将里面的内容改为:
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 不报错即表示安装成功
边栏推荐
- 【LeetCode】101.对称二叉树
- The display of the article list and the basics of creating articles and article details
- When deleting a folder, the error "Error ox80070091: The directory is not empty" is reported. How to solve it?
- Redis实现分布式锁
- Scala parallel collections, parallel concurrency, thread safety issues, ThreadLocal
- Add Modulo 10 (规律循环节,代码实现细节)
- 英文语法-状语从句
- gpnmb+ gpnmb-AT2 cell idling mapping Epithelial cell idling mapping
- flutter 应用 抓包
- For heavy two-dimensional arrays in PHP
猜你喜欢
【LeetCode】112. Path sum
Network LSTM both short-term and long-term memory
【LeetCode】112.路径总和
MySQL 主从切换步骤
STP生成树(端口状态+端口角色+收敛机制 )|||| STP优化技术( uplinkfast技术+Portfast技术+backbonefast技术 )详解
浅聊缓存函数
110道 MySQL面试题及答案 (持续更新)
Machine learning (formula derivation and code implementation)--sklearn machine learning library
"Easy to use" websites that others don't know, make you more efficient
多媒体数据处理实验3:图像特征提取与检索
随机推荐
多线程下的单例模式
mysql 事务原理详解
10分钟带你入门chrome(谷歌)浏览器插件开发
Oracle数据库表空间整理回收与释放操作
2022最新整理软件测试常见面试题附答案
【LeetCode】112.路径总和
关于Unity,Laya学习,第一步加载Unity加载场景
ClickHouse删除数据之delete问题详解
The window of the chosen data flow
多媒体数据处理实验2:PCA
pytorch one-hot tips
批量将PNG格式转化为JPG格式
dflow入门1——HelloWorld!
When deleting a folder, the error "Error ox80070091: The directory is not empty" is reported. How to solve it?
mysql的union和union all
文章列表的显示 以及创建文章 还有文章详情的基本
梯度消失和梯度爆炸
cert-manager使用
【LeetCode】zj面试-把字符串转换成整数
验证浮点数输入