pytorch安装
Pytorch安装
一、安装anaconda(...此处省略步骤..)
不是很难安装,试试就可
二、环境管理
-
这个是在Anaconda Prompt下操作的
conda create -n pytorch python=3.8
这是创建的格式
"pytorch"是这个环境变量的名字
"python=3.8"是我们要确定的当前环境的版本数
-
No module named ’ 安装包名字’的解决方法
已经安装完成!
- 补充:接着继续根据Could not find a version that satisfies the requirement 安装包名字 查问题:会提示换成国内的pip源 可以解决问题
-
方法一:pip install 安装包名字 -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com //豆瓣镜像网站
-
方法二:pip install 安装包名字 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com //豆瓣
-
方法三:pip install 安装包名字 -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn //清华大学
-
还有下面几个国内pip 源,大家可以依次按照上面的方法试下
http://mirrors.aliyun.com/pypi/simple/ 阿里云
https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学 http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
三、pycharm配置
点击红色框按钮,添加之前conda创建的pytorch虚拟环境,在此就可以运行pytorch了
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)