树莓派3B-pytorch环境的配置
创始人
2024-05-29 20:51:33

主要流程

【树莓派入门】从零开始在树莓派上运行YOLOV5项目实战教程_yolov5 树莓派_❀周周~的博客-CSDN博客

 换源

换源,一定要看清楚自己的版本!!!这里我的是bullseye

树莓派换源教程_萌新源的博客-CSDN博客

sudo nano /etc/apt/sources.list

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb http://ftp.de.debian.org/debian stretch main
deb http://ftp.cn.debian.org/debian stretch main

 sudo nano /etc/apt/sources.list.d/raspi.list

deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main

给树莓派3b安装64位操作系统,参考以下文章

保姆级教程,树莓派最新64位系统部署yolov5_yolov5部署到树莓派_机器不学习,我学习的博客-CSDN博客s

创建虚拟环境

树莓派安装python以及新建虚拟环境_树莓派python环境搭建_Go__home的博客-CSDN博客

过程中遇到的一些问题

问题一

 在开始sudo apt-get update出现如下问题

 输入以下命令解决

sudo rm /var/lib/apt/lists/lock

 问题二

在配置环境步骤,安装依赖和opencv的时候,遇到了如下问题

 问题解决参考以下文章

E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages_corelone2的博客-CSDN博客_held packages

问题三

在使用pip安装的时候,如果报如下错误,可以使用换源安装,在后面加上:

-i http://pypi.douban.com/simple --trusted-host pypi.douban.com

问题四

这个环境我弄了好多天,好不容易到最后了,执行这个命令的时候

pip3 install -r requirements.txt

出现以下错误

ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device

 然后查了一下发现内存不够了,又去扩容,没反应,然后想起来自己的sd卡是8GB的,就去换了一个16GB卡

问题五

 由于我们是进行Pytorch原生模型在linux上的部署,所以需要在命令行输入

export OMP_NUM_THREADS=1

相关内容

热门资讯

苗族的传统节日 贵州苗族节日有... 【岜沙苗族芦笙节】岜沙,苗语叫“分送”,距从江县城7.5公里,是世界上最崇拜树木并以树为神的枪手部落...
北京的名胜古迹 北京最著名的景... 北京从元代开始,逐渐走上帝国首都的道路,先是成为大辽朝五大首都之一的南京城,随着金灭辽,金代从海陵王...
世界上最漂亮的人 世界上最漂亮... 此前在某网上,选出了全球265万颜值姣好的女性。从这些数量庞大的女性群体中,人们投票选出了心目中最美...
猫咪吃了塑料袋怎么办 猫咪误食... 你知道吗?塑料袋放久了会长猫哦!要说猫咪对塑料袋的喜爱程度完完全全可以媲美纸箱家里只要一有塑料袋的响...
长白山自助游攻略 吉林长白山游... 昨天介绍了西坡的景点详细请看链接:一个人的旅行,据说能看到长白山天池全凭运气,您的运气如何?今日介绍...