这是怎么回事,求助!
在我的 RPi4 上安装 OneWire lib 时遇到问题。这是安装和错误的完整日志:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting onewire
Using cached https://files.pythonhosted.org/packages/03/7b/cd3ab987843e40ab0c09c0c5f7d49a270f6caa806bf06a59ecdc81725b3a/onewire-0.2.tar.gz
Building wheels for collected packages: onewire
Running setup.py bdist_wheel for onewire ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2239azyu/onewire/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-wqz46o7n --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/onewire
copying onewire/__init__.py -> build/lib.linux-armv7l-3.7/onewire
running build_ext
building 'onewire._ow' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/onewire
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c onewire/_ow.c -o build/temp.linux-armv7l-3.7/onewire/_ow.o
onewire/_ow.c:2:10: fatal error: owcapi.h: Нет такого файла или каталога
#include <owcapi.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for onewire
Running setup.py clean for onewire
Failed to build onewire
Installing collected packages: onewire
Running setup.py install for onewire ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2239azyu/onewire/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-15wkf469/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.7
creating build/lib.linux-armv7l-3.7/onewire
copying onewire/__init__.py -> build/lib.linux-armv7l-3.7/onewire
running build_ext
building 'onewire._ow' extension
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/onewire
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c onewire/_ow.c -o build/temp.linux-armv7l-3.7/onewire/_ow.o
onewire/_ow.c:2:10: fatal error: owcapi.h: Нет такого файла или каталога
#include <owcapi.h>
^~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2239azyu/onewire/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-15wkf469/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-2239azyu/onewire/
我正在使用 Python3。尝试使用python3 -m pip install onewire
和 default pip3 install
,但总是有相同的错误。
我还阅读了一些关于 RPM 和 Anaconda 的内容,但我不想安装任何额外的软件。