安装 wiringpi(切换到 wiringOP-Python)
sudo apt-get update
sudo apt-get -y install git swig python3-dev python3-setuptools
git submodule update --init --remote
#重点 x n
/home/orangepi/miniconda3/envs/opencv0/bin/python generate-bindings.py > bindings.i
sudo /home/orangepi/miniconda3/envs/opencv0/bin/python setup.py install
结果
(opencv0) orangepi@orangepi3b:~/wiringOP-Python$ python
Python 3.11.7 (main, Dec 15 2023, 18:04:41) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wiringpi
>>>