-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3 Wrapper not installing properly #845
Comments
The wrapper shouldn't be broken. I need a little more detail about what you saw when installing the wrapper. The username |
Hi and thanks for your reply, Here a full output code:
Thank you! |
This means that you didn't re-install the wrapper. Before we go any further, I'm going to ask you try our newer python pkg called pyRF24. The install is much more automated and it doesn't need the C++ libs installed. I'm recommending this because troubleshooting the older python wrappers (what you're playing with now) is difficult when working remotely with... um, "non-experts" (no offense intended). These older python wrappers have become highly "nuanced" to get working correctly over the last 6 years.
|
FYI, I just tried a fresh install on my RPi4, and it worked without a problem. Here is what I executedpi@rpi4:~/github/RF24/build $ export RF24_DRIVER=SPIDEV
pi@rpi4:~/github/RF24/build $ echo $RF24_DRIVER
SPIDEV
pi@rpi4:~/github/RF24/build $ cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- RF24 library version: 1.4.2
CMake Warning at cmake/Cache.cmake:27 (message):
ccache is enabled but was not found. Not using it
Call Stack (most recent call first):
CMakeLists.txt:39 (include)
-- detected SoC: BCM2711
-- detected CPU type: armv7l
-- tool name being used: arm-linux-gnueabihf
-- Found pigpio library: /usr/lib/libpigpio.so
-- RF24_DRIVER (set from env var) = SPIDEV
-- Using driver: SPIDEV
-- linking to pigpio lib for interrupt functionality
-- ready to package: librf24-SPIDEV_1.4.2-1_armhf.deb
-- ready to package: librf24-SPIDEV-1.4.2-1.armhf.rpm
-- Using utility library: /usr/lib/libpigpio.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/github/RF24/build
pi@rpi4:~/github/RF24/build $ make
Scanning dependencies of target rf24
[ 16%] Building CXX object CMakeFiles/rf24.dir/RF24.cpp.o
[ 33%] Building CXX object CMakeFiles/rf24.dir/utility/SPIDEV/gpio.cpp.o
[ 50%] Building CXX object CMakeFiles/rf24.dir/utility/SPIDEV/spi.cpp.o
[ 66%] Building CXX object CMakeFiles/rf24.dir/utility/SPIDEV/compatibility.cpp.o
[ 83%] Building CXX object CMakeFiles/rf24.dir/utility/SPIDEV/interrupt.cpp.o
[100%] Linking CXX shared library librf24.so
[100%] Built target rf24
pi@rpi4:~/github/RF24/build $ sudo make install
[100%] Built target rf24
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/RF24/utility/SPIDEV/includes.h
-- Up-to-date: /usr/local/include/RF24/utility/SPIDEV/gpio.h
-- Installing: /usr/local/include/RF24/utility/SPIDEV/spi.h
-- Up-to-date: /usr/local/include/RF24/utility/SPIDEV/compatibility.h
-- Up-to-date: /usr/local/include/RF24/utility/SPIDEV/RF24_arch_config.h
-- Installing: /usr/local/include/RF24/utility/SPIDEV/interrupt.h
-- Installing: /usr/local/lib/librf24.so.1.4.2
-- Up-to-date: /usr/local/lib/librf24.so.1
-- Up-to-date: /usr/local/lib/librf24.so
-- Installing: /usr/local/include/RF24/RF24.h
-- Up-to-date: /usr/local/include/RF24/nRF24L01.h
-- Installing: /usr/local/include/RF24/printf.h
-- Up-to-date: /usr/local/include/RF24/RF24_config.h
-- Installing: /usr/local/include/RF24/utility/includes.h
-- Updating ldconfig
pi@rpi4:~/github/RF24/build $ cd ../pyRF24/
pi@rpi4:~/github/RF24/pyRF24 $ ls
build crossunixccompiler.py dist __pycache__ pyRF24.cpp RF24.egg-info setup.py
pi@rpi4:~/github/RF24/pyRF24 $ rm -r ./build/ ./dist/ ./RF24.egg-info/ ./__pycache__/
pi@rpi4:~/github/RF24/pyRF24 $ ls
crossunixccompiler.py pyRF24.cpp setup.py
pi@rpi4:~/github/RF24/pyRF24 $ python -m pip install --upgrade pip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in /usr/lib/python3/dist-packages (20.3.4)
Collecting pip
Downloading https://www.piwheels.org/simple/pip/pip-22.1.2-py3-none-any.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 3.6 kB/s
Installing collected packages: pip
WARNING: The scripts pip, pip3 and pip3.9 are installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.1.2
pi@rpi4:~/github/RF24/pyRF24 $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@rpi4:~/github/RF24/pyRF24 $ export PATH=$PATH:/home/pi/.local/bin
pi@rpi4:~/github/RF24/pyRF24 $ python -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/pi/github/RF24/pyRF24
Preparing metadata (setup.py) ... done
Building wheels for collected packages: RF24
Building wheel for RF24 (setup.py) ... done
Created wheel for RF24: filename=RF24-1.4.2-cp39-cp39-linux_armv7l.whl size=497147 sha256=9ea9e57338ddf36b68ec7f7507a3a4c045da56da22cbc8307bd931d91095075a
Stored in directory: /tmp/pip-ephem-wheel-cache-r41tdpw3/wheels/78/48/3f/1b4e1fb4bdc1515eb6f8083035a3e707815f75452f4f37d821
Successfully built RF24
Installing collected packages: RF24
Successfully installed RF24-1.4.2
pi@rpi4:~/github/RF24/pyRF24 $ pip list
Package Version
----------------- ---------
...
RF24 1.4.2
...
pi@rpi4:~/github/RF24/pyRF24 $ python
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from RF24 import RF24
>>> So, to summarize:
I don't think that |
Good morning! Thank you so much for your answer - with your tips it's now working perfectly! This will lead to the files being downloaded locally on the rpi:
Of course you need to install python and pip first:
Don't forget to link the libboost afterwards:
BR and ty again! |
I'm now adjusting the pyRF24 API to be drop-in compatible with these older python wrappers (pending nRF24/pyRF24#9) |
Hello everybody,
rasp4 with fresh Raspberry Pi OS lite.
Installed RF24 like stated in https://nrf24.github.io/RF24/md_docs_linux_install.html (automatic install with SPI option, activated spi before with raspi-config)
Tried to install Python 3 Wrapper using https://nrf24.github.io/RF24/md_docs_python_wrapper.html, install itself seems to work, but during last step when testing, i only get this error:
Python package seems to be installed for me, but i am not an expert:
Tried several other OS (buster, ...), everytime the same message. What am I doing wrong? Or is the Wrapper install broken?
Any help is greatly appreciated!
Thank you :)
The text was updated successfully, but these errors were encountered: