当前位置:网站首页>解决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
边栏推荐
- 安全帽识别
- TAMNet:A loss-balanced multi-task model for simultaneous detection and segmentation
- AI-based intelligent image recognition: 4 different industry applications
- Mei cole studios - fifth training DjangoWeb application framework + MySQL database
- Redis主从复制的搭建
- Joint 3D Instance Segmentation and Object Detection for Autonomous Driving
- CVPR2022——A VERSATILE MULTI-VIEW FRAMEWORK
- MGRE实验
- GBase 8s是如何保证数据一致性
- C语言字节对齐,看这篇就够了
猜你喜欢
随机推荐
秦始皇到底叫嬴政还是赵政?
Maykel Studio - Django Web Application Framework + MySQL Database Fourth Training
Toolbar 和 DrawerLayout 滑动菜单
Maykle Studio - HarmonyOS Application Development Third Training
docker搭建redis主从和哨兵模式集群
目标检测——Faster R-CNN 之 Fast R-CNN
SQL注入
Reconstruction and Synthesis of Lidar Point Clouds of Spray
梅科尔工作室-HarmonyOS应用开发第三次培训
梅科尔工作室-华为云ModelArts第一次培训
梅科尔工作室-PR第三次培训笔记(效果与转场及插件使用)
GBase 8s的多线程结构
GBASE数据库迁移(Oracle到GBase 8s的数据类型映射)
AI-based intelligent image recognition: 4 different industry applications
目标检测——LeNet
Zhejiang University School of Software 2020 Guarantee Research Computer Real Question Practice
GBase 8s集中式企业级安全事务型数据库
MPLS 实验
【mysql】查询不区分大小写(用户密码登录不区分大小写)
LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS