当前位置:网站首页>vscode+pytorch使用经验记录(个人记录+不定时更新)
vscode+pytorch使用经验记录(个人记录+不定时更新)
2022-08-05 05:13:00 【道人兄】
1.Anaconda安装
我是边学小土堆的pytouch教学,所以anaconda安装按照up主来的,有需要的同学可自行b站搜索“我是土堆”进行学习,他是pycharm+pytouch,所以跟我不太一样
python是anaconda自带的,所以我们可以不用下载了,可以直接调用
我原来电脑是有使用python3.1了,我是先将其进行删除,防止anaconda安装影响
![]()
找到这个打开,里面点击unstall就可以了
2.vscode+pytouch环境参数配置
①一个是拓展,见下图

②环境选择


③环境变量添加(我也不知道有没有必要,我还是弄了)
按照你的anaconda安装路径来,参考我的

记得选择创建再浏览,不然会把别的替换掉了!!!
3.网上找的一些源码进行尝试
我跑的代码也是从小土堆来的,他的课帮我上手入门很快!!
问题:
在运行时,出现ModuleNotFoundError: No module named 'tensorboard'

其实就是缺少tensorboard的工具,去anaconda下载就可以了
我使用的是清华镜像源,不然慢的要死
打开anaconda prompt,然后输入一下指令
pip install tensorboard-i https://pypi.tuna.tsinghua.edu.cn/simple/等待安装好就可以了,如果提示pip要update,按照他的指令来输入,然后重新输上面的安装指令就可以了
![]()
最后顺便附上国内镜像源吧,其实网上也很多,放着也不要去找了
①国内镜像大全:
阿里云 http://mirrors.aliyun.com/pypi/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
②换源命令
临时:pip命令+ -i +镜像地址。例如 pip install numpy -i https://mirrors.aliyun.com/pypi/simple/
4.安装opencv
我在找一些人脸识别实例需要用到opencv,所以也参考以下教程试了一遍,亲测有效!
(11条消息) python安装opencv库 anaconda虚拟环境pytorch安装opencv_Ts_____的博客-CSDN博客_pytorch安装opencv
直接打开anaconda prompt,先进入pytorch环境,然后cd进入安装目录的site-packages,参考我的

然后输入pip3 install opencv-python安装就好了(如果你安装的python版本是2.x的就把3去掉)
测试一下:
输入python,然后import一下cv2,没报错就是可以了

(本人电子类学生学习机器学习神经网络,推荐课程吴恩达老师、李宏毅老师,b站都有相应课程,然后pytouch学习小土堆就可以了,希望大家都能学到东西,我也是最近换方向,需要用到,小白学起的)
边栏推荐
猜你喜欢

Flutter真机运行及模拟器运行

Geek卸载工具

A blog clears the Redis technology stack
![[cesium] 3D Tileset model is loaded and associated with the model tree](/img/03/50b7394f33118c9ca1fbf31b737b1a.png)
[cesium] 3D Tileset model is loaded and associated with the model tree

【Transfer】What is etcd

OFDM 十六讲 5 -Discrete Convolution, ISI and ICI on DMT/OFDM Systems

使用二维码解决固定资产管理的难题

u-boot debugging and positioning means

Basic properties of binary tree + oj problem analysis
![[cesium] element highlighting](/img/99/504ca9802db83eb33bc6d91b34fa84.png)
[cesium] element highlighting
随机推荐
Mvi架构浅析
LeetCode:1403. 非递增顺序的最小子序列【贪心】
Flutter真机运行及模拟器运行
2022牛客多校第四场C.Easy Counting Problem(EGF+NTT)
2022 The 4th C.Easy Counting Problem (EGF+NTT)
Flutter学习三-Flutter基本结构和原理
redis事务
Judgment statement _switch and case
位运算符与逻辑运算符的区别
[Student Graduation Project] Design and Implementation of the Website Based on the Web Student Information Management System (13 pages)
淘宝账号如何快速提升到更高等级
2022 Hangzhou Electric Multi-School 1st Session 01
UVA10827
[Software Exam System Architect] Software Architecture Design ③ Domain-Specific Software Architecture (DSSA)
【无标题】
Excel Paint
Excel画图
入口点注入
第5讲 使用pytorch实现线性回归
电话溥功能