当前位置:网站首页>window11 conda安装pytorch过程中遇到的一些问题
window11 conda安装pytorch过程中遇到的一些问题
2022-07-06 09:28:00 【叻斯哩_LeslieWu】
项目场景:
今天抽空重装了一遍anaconda,换上了miniconda(anaconda太大了,很多没用的包占用位置,并且pycharm经常会索引pkg的文件)。
问题描述1
重装conda后,然后配好清华源后,就想先把pytorch装好,根据pytorch官网命令,复制下载,但是发现安装torch的时候依旧速度比较慢。
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
原因分析:
命令中结尾的 -c pytorch 需要去掉,否则该命令默认还是走pytorch的源,依旧无法使用国内源的速度。
解决方案:
删除结尾内容即可。
conda install pytorch torchvision torchaudio cudatoolkit=11.3
问题描述2
按照要求配置好后,按照命令进行下载pytorch,后来遇到了一个问题,PackagesNotFoundError: The following packages are not available from current channels:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- torchvision
- torchaudio
Current channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
原因分析:
pytorh某些依赖包在当前频道中不可用。
解决方案:
在.condarc的文件做修改,把pytorch优先级抬上去
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/# 把pytorch抬上去哈哈
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
遇到貌似安装停止的时候千万不要ctrl+c中断
在安装到pytorch这个包的时候,再安装到99的时候,看起来好像停止了失败了,其实不是的,下载了包之后,压缩包得解压,然后还得传到对应的env里面,所以需要的时间较多,之前有两次我都看起来它好像失败了,然后中断,导致conda还遗留了缓存,需要conda clean --all清理一下重新下载,浪费了不少时间。
边栏推荐
- 双向链表—全部操作
- b站 实时弹幕和历史弹幕 Protobuf 格式解析
- MySQL grants the user the operation permission of the specified content
- 信息安全-安全编排自动化与响应 (SOAR) 技术解析
- 【练习-7】(Uva 10976)Fractions Again?!(分数拆分)
- 409. Longest palindrome
- Nodejs crawler
- Research Report on shell heater industry - market status analysis and development prospect forecast
- E. Breaking the Wall
- X-Forwarded-For详解、如何获取到客户端IP
猜你喜欢
X-forwarded-for details, how to get the client IP
Penetration test 2 --- XSS, CSRF, file upload, file inclusion, deserialization vulnerability
Borg Maze (BFS+最小生成树)(解题报告)
2027. Minimum number of operations to convert strings
Penetration test (2) -- penetration test system, target, GoogleHacking, Kali tool
【高老师UML软件建模基础】20级云班课习题答案合集
Analyse du format protobuf du rideau en temps réel et du rideau historique de la station B
信息安全-威胁检测引擎-常见规则引擎底座性能比较
Programmers, what are your skills in code writing?
Penetration testing (5) -- a collection of practical skills of scanning King nmap and penetration testing tools
随机推荐
【练习-11】4 Values whose Sum is 0(和为0的4个值)
MySQL import database error [err] 1273 - unknown collation: 'utf8mb4_ 0900_ ai_ ci’
渗透测试 ( 8 ) --- Burp Suite Pro 官方文档
China exterior wall cladding (EWC) market trend report, technical dynamic innovation and market forecast
Research Report of cylindrical grinder industry - market status analysis and development prospect forecast
初入Redis
【练习-2】(Uva 712) S-Trees (S树)
信息安全-威胁检测-flink广播流BroadcastState双流合并应用在过滤安全日志
Opencv learning log 19 skin grinding
Common configuration files of SSM framework
E. Breaking the Wall
信息安全-安全专业名称|CVE|RCE|POC|VUL|0DAY
X-forwarded-for details, how to get the client IP
渗透测试 ( 4 ) --- Meterpreter 命令详解
7-1 understand everything (20 points)
1005. Maximized array sum after K negations
渗透测试 ( 2 ) --- 渗透测试系统、靶机、GoogleHacking、kali工具
对iptables进行常规操作
Nodejs crawler
628. Maximum product of three numbers