Pytorch+jupyter notebook+win10开发环境搭建

一、Pytorch安装

1.安装anaconda

2.更新软件源

  • conda config
  • 打开 C:\Users\用户名\.condarc 文件, 修改为:
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
ssl_verify: false
show_channel_urls: true

3.创建并激活虚拟环境

conda create -n env_name python=3.7
activate env_name

4.安装pytorch

官网地址:pytorch官网
根据自己硬件环境生成相应的安装命令, 我的是
conda install pytorch torchvision torchaudio cpuonly
注意要 去掉末尾的-c pytorch,这个默认安装渠道为官方渠道,可能会很慢

二、conda命令

conda info 查看软件源
conda info -e 查看所有虚拟环境

三、jupyter notebook设置

1.UI设置

两种风格

jt -t oceans16 -f fira -fs 14 -cellw 96% -ofs 14 -dfs 14 -T
jt --lineh 140 -f consolamono -cellw 96% -tf ptmono -t grade3 -ofs 14 -nfs 14 -tfs 14 -fs 16 -T -N

2.虚拟环境中使用jupyter notebook

conda install nb_conda

3.增加代码补全

conda install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user --skip-running-check

在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值