linux jupyter notebook使用pytorch

1.自行安装jupyter

conda install ipython
conda install jupyter

2.

ipython kernelspec install-self --user

3.

mkdir -p /home/fire/.ipython/kernels

4.

mv /home/fire/.local/share/jupyter/kernels/python3 /home/fire/.ipython/kernels/torch

5.

cd /home/fire/.ipython/kernels/torch/

6.

gedit kernel.json

7.将 display_name 中的默认值 Python 3 改为自己起的名字(torch),然后保存并退出

注意:这里的名字一定要和上面第四步起的名字对应,还有检查第三行的路径是否为安装了Pytorch的Python路径,自己的打开为python路径,里面没有安装pytorch,需修改,否则会报错如下:(名字一定要前后对应)
 

A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.

/home/fire/Pictures/Screenshot from 2021-01-27 12-16-43.png

错误示范:

正确:  核的名字自己修改,图中与上文命名的torch不一样,按上文因改为torch

 

参考:https://blog.csdn.net/weixin_41143397/article/details/89923896     

感谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值