jupyter 创建虚拟环境并安装pytorch(gpu)

windows

1,打开anaconda Prompt

2,查看已有conda环境(避免一会创建新的重名)

3,创建自己新项目的虚拟环境

conda create -n haha python-3.7

haha: 你的虚拟环境变量名

python=3.7: 你的环境的python版本(自己随便设置,3.6、2.7 都可以)

中间需要输入 y(选n就推出安装了)

4,激活你的新环境

activate haha

5,重启你的jupyter

6,新建项目,选中你的环境 new--> haha(你的新环境name)

或者 选择好环境然后登陆jupyter notebook:

 

7,选择你的pytorch版本之前查看自己的cuda版本

!nvidia-smi

8,然后去pytorch主页点击 install

9,选择自己的pytorch版本

10,安装

11,测试

linux

1,the same way to create env of conda

2,

conda activate your_enc_name

3,

conda install ipykernel

4,

 python -m ipykernel install --user --name your_env_name --display-name "your_env_name"

5,(maybe will show that you didn't install jupyter,just run   'pip install jupyter'  before running jupyter)

pip install jupyter

6,

jupyter notebook

7 then you can create your own preject with your new conda env same as windows blew...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值