如何修复 ModuleNotFoundError: No module named 'picamera'
问题:
你想使用 Raspberry Pi 相机运行 Python 脚本,但你看到类似这样的错误消息
picamera_traceback.txt
Traceback (most recent call last):
File "mycamera.py", line 2, in <module>
import picamera
ModuleNotFoundError: No module named 'picamera'解决方案
你需要使用 pip 安装 picamera Python 模块:
pip_install_picamera.sh
pip install -U picamera如果你看到
sudo_pip_not_found.txt
sudo: pip: command not found使用以下命令安装 pip
install_python3_pip.sh
sudo apt install -y python3-pipCheck out similar posts by category:
Python, Raspberry Pi
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow