urethane 2022-09-15 10:18 采纳率: 50%
浏览 115

python安装GPIO报错

问题遇到的现象和发生背景

在树莓派上安装了Ubuntu的系统,接着想在Ubuntu上安装GPIO的库,提示如下错误,请教大家该怎么办

用代码块功能插入代码,请勿粘贴截图

ubuntu@ubuntu:/RPi.GPIO-0.7.0$ python3 readall
python3: can't open file '/home/ubuntu/RPi.GPIO-0.7.0/readall': [Errno 2] No such file or directory
ubuntu@ubuntu:
/RPi.GPIO-0.7.0$ python3 setup.py install
/home/ubuntu/RPi.GPIO-0.7.0/setup.py:23: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.core import setup, Extension
running install
running build
running build_py
running build_ext
building 'RPi._GPIO' extension
aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c source/c_gpio.c -o build/temp.linux-aarch64-3.10/source/c_gpio.o
error: command 'aarch64-linux-gnu-gcc' failed: No such file or directory
ubuntu@ubuntu:~/RPi.GPIO-0.7.0$

  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-09-15 11:05
    关注
    评论

报告相同问题?

问题事件

  • 创建了问题 9月15日