‘’’
show_channel_urls: true
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
‘’’
2021-10-30-raspios-bullseye-arm64.img
查看系统uname -a
下载condahttps://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py37_4.9.2-Linux-aarch64.sh
安装Miniconda3,网上说4.9.2版本才能支持64位系统bash Miniconda3-py37_4.9.2-Linux-aarch64.sh
更新环境变量export PATH="/home/pi/miniconda3/bin:$PATH"
source ~/.bashrc
conda config --set show_channel_urls yes
将最上面的复制进去
sudo apt-get install build-essential cmake libgtk-3-dev libboost-all-dev -y
conda install numpy
pip3 install scipy -i https://mirrors.aliyun.com/pypi/simple/
pip3 install imageio -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install scikit-image -i https://mirrors.aliyun.com/pypi/simple/
pip3 install /home/pi/Desktop/dlib-19.9.0.tar.gz
pip3 install /home/pi/Desktop/face_recognition_models-0.3.0-py2.py3-none-any.whl
pip3 install face_recognition -i https://pypi.tuna.tsinghua.edu.cn/simple
conda env export > fr.yaml
conda install opencv
python3
import cv2,face_recognition,dlib,numpy
pip install pigpio
pip isnatll serial
sudo pigpiod
ls /dev/tty*
https://blog.forgiveher.cn/posts/1574671872/
https://blog.csdn.net/u012197995/article/details/109235518
http://www.airspayce.com/mikem/bcm2835/
http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
sudo apt-get install libcap2 libcap-dev
tar zxvf bcm2835-1.xx.tar.gz
cd bcm2835-1.xx
./configure
make
sudo make check
sudo make install
vcgencmd get_camera
sudo apt-get install python3-opencv
libcamera-still -o cam.jpg
import cv2
cap = cv2.VideoCapture(’/dev/video0’, cv2.CAP_V4L)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter.fourcc(‘M’, ‘J’, ‘P’, ‘G’))
ret, frame = cap.read()
cv2.imwrite(‘image.jpg’, frame)
video = cv2.VideoWriter(‘video.avi’,
cv2.VideoWriter_fourcc(‘I’, ‘4’, ‘2’, ‘0’),
24, (640, 480)) # 初始化文件写入 文件名 编码解码器 帧率 文件大小
for i in range(10):
# take frame 读取帧
ret, frame = cap.read()
if ret:
# write frame to file
cv2.imwrite(‘image-{}.jpg’.format(i), frame) # 截图
video.write(frame) # 录制视频
cap.release()
video.release()
sudo nano /boot/config.txt
# Automatically load overlays for detected cameras
#camera_auto_detect=1
start_x=1
sudo nano /etc/modules
i2c-dev
#bcm2835-v4l2
https://github.com/joan2937/pigpio/blob/master/EXAMPLES/Python/DHT11_SENSOR/dht11.py
miniconda无法安装RPi.GPIO,复制树莓派自带python原有的即可/lib/python3/dist-packages/RPi
/home/pi/miniconda3/lib/python3.9/site-packages/RPi
sudo env "PATH=/home/pi/miniconda3/bin:$PATH" su
python /home/pi/Desktop/dependence/SHTC3.py
树莓派启用uart串口
在config启用serial 禁用串口控制台
sudo nano /boot/config.txt
dtoverlay=pi3-miniuart-bt
ls -l /dev
serial0 -> ttyAMA0
sudo apt-get install minicom
minicom -b 9600 -o -D /dev/ttyAMA0
先Ctrl+A,再E。可翻转回显状态
sudo apt-get install tightvncserver xrdp
sudo i2cdetect -y 1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)