树莓派3B重装系统
-
sd卡插读卡器再插电脑usb
-
使用SD Card Formatter工具格式化sd卡
-
使用官方烧录工具Imager烧录系统
- 设备选择树莓派3
- 操作系统选择树莓派OS32位
- 选择SD卡
- 提示:Would you like to apply OS等,编辑设置:修改主机名、用户名、密码、wifi、ssh使用密码登录
- 烧录成功
初始配置
外接7寸显示屏
-
打开sd卡根目录下的config.txt文件,在文件最后加入:
max_usb_current=1 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=87 hdmi_timings=1024 0 168 32 120 600 0 15 6 14 0 0 0 60 0 51200000 3 hdmi_drive=1
vscode连接树莓派
- 前提:树莓派与电脑连接在同一网络下
- ifconfig查看树莓派wlan0下的ip
- vscode下载remote ssh插件
- Ctrl+Shift+P添加远程连接
- 配置完成,即可在vscode终端输入命令,在左侧文件管理器中查看树莓派文件
配环境
sudo apt update
python3 -m venv ~/myenv //创建虚拟环境
source ~/myenv/bin/activate //激活虚拟环境
pip install tensorflow numpy pillow //在虚拟环境中安装包
deactivate //退出虚拟环境
pip3 install protobuf
pip3 install tensorflow-hub
pip3 install pycocotools