我试图在带有 ubuntu 20.10 桌面的树莓派 4 上安装 rpi.gpio,如下所示
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-pip python-dev
Run Code Online (Sandbox Code Playgroud)
它给出了
note, selecting 'python-dev-is-python2' instead of 'python-dev'
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip
Run Code Online (Sandbox Code Playgroud)
所以我试过了
sudo apt-get install python3-pip python-dev
Run Code Online (Sandbox Code Playgroud)
正常安装它但是然后,对于
sudo pip install RPi.GPIO
Run Code Online (Sandbox Code Playgroud)
这给出了非常大的错误作为开始
ERROR: Command errored out with exit …Run Code Online (Sandbox Code Playgroud)