树莓派4b之搭载深度学习环境 python+pytorch+jupyter

本文使用树莓派4b,系统版本buster
教程一:树莓派4b搭建PyTorch(for buster)

1、根据上面的教程一安装python3.5,再安装pytorch,
2、用sudo apt install jupyter 安装jupyter
3、将默认的python3.7替换为python3.5,因为提供的那个pytorch不支持3.7

先删除之前python的连接

sudo rm /usr/bin/python

创建python3.5的连接,使得jupyter默认使用python3.5

sudo ln -s /usr/bin/python3.5 /usr/bin/python3  

ps : 此步骤3如果之前操作过了,可以跳过

4、输入jupyter noyebook启动jupyter发现会出错,更新一下zmq,但是正常更新也会出错,所以需要忽略版本更新 更新成功会显示 Successfully installed pyzmq-18.1.1

sudo pip3.5 install pyzmq –ignore-installed

更新成功之后就能够打开jupyter 也能在jupyter里面引入torch模块了

上成功安装的图,控制台输入jupyter noyebook可调出jupyter
此时就可以在里面使用python开始你的人工智能之旅吧。

在这里插入图片描述

发布了31 篇原创文章 · 获赞 2 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_27149279/article/details/105178835
今日推荐