当前位置:网站首页>解决jupyter中import torch出错问题
解决jupyter中import torch出错问题
2022-08-11 05:23:00 【壹万1w】
前提:有pytorch虚拟环境
步骤:
以管理员身份运行annaconda prompt
1、进入jupyter运行的文件
2、在此文件下激活pytorch
3、进入jupyter notebook
小tip:使用镜像,加速安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch
pip
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple
conda install
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
删除添加的源,恢复官方源
conda config --remove-key channels
查看源的优先权,
$ conda config --get channels
##下面的是输出
--add channels 'defaults' # lowest priority
--add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
--add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/' # highest priority
jupyter报错ModuleNotFoundError: No module named ‘matplotlib‘
和上述步骤一样
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch matplotlib
边栏推荐
- Hardhat Recognition System - Solving Regulatory Conundrums
- GBase 8s存储结构简介及空间管理
- GBase 8s是如何保证数据一致性
- Maykle Studio - HarmonyOS Application Development Fourth Training
- 目标检测——Faster R-CNN 之 Fast R-CNN
- The working principle and industry application of AI intelligent image recognition
- Zhejiang University School of Software 2020 Guarantee Research Computer Real Question Practice
- 微信小程序部分功能细节
- 华为adb wifi调试断线问题解决
- 【docker-compose】mysql安装
猜你喜欢
随机推荐
LiDAR Snowfall Simulation for Robust 3D Object Detection
>>开发工具:IDEA格式化代码无效
Toward a Unified Model
【转载】图表:数读2022年上半年国民经济
RIP综合实验
Safety helmet identification system - escort for safe production
对MySQL查询语句的分析
安全帽识别
第七届集美大学程序设计竞赛(个人赛)题解
静态综合复习实验
慢查询语句的优化思路
安全帽识别算法
Reconstruction and Synthesis of Lidar Point Clouds of Spray
The working principle and industry application of AI intelligent image recognition
梅科尔工作室-第四次PR培训笔记(字幕和标题动画,关键帧动画和声音处理)
Redis持久化方案RDB详解
数据库(其二)
GBase 8a 并行技术
解决Glide图片缓存问题,同一url换图片不起作用问题
>>开发工具:开发工具排名对比