-
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
Is the python wrapper install steps supposed to work on RPi Zero too? #853
Comments
You can check if the module is installed by using You used the older install instructions. Those won't work for 64 bit OS. If you're using the 64 bit (which might only work on the latest variant of RPi0), then you need to use the CMake instructions. Going forward, these CMake instructions are preferred because they make no assumption about the available compilers. If you built the C++ libs using the SPIDEV driver, then there's no need to use I highly recommend using a venv, but that is completely optional.
Again, using We have a newer python package that's meant to be easier than installing the C++ libs and associated python wrappers. You can try that out (meant to be drop-in compatible) by visiting https://nRF24.github.io/pyRF24 It comes with networking, mesh and a BLE API. Best of all, it doesn't use the same C++ RF24* libs installed on your system (it builds the libs in isolation). |
@alanmiller Is this resolved now? Was using |
I switched to the packaged versions of RF24 and RF24Network
and tried to build the new Python wrapper but got errors
Full output attached. |
Thanks for the log. Looks like there was a problem when installing cmake from pypi. Removing the cmake dependency from the pkg will require users manually install cmake (likely from [build-system]
requires = [
"setuptools>=45",
"wheel",
"pybind11>=2.7.1; sys_platform == 'linux'",
"scikit-build; sys_platform == 'linux'",
- "cmake; sys_platform == 'linux'",
"ninja; sys_platform == 'linux'",
"setuptools_scm>=6.2"
] then installing cmake on its own
I'll try to reproduce and remedy this... Note you don't need the C++ libs installed for pyrf24 pkg - they are built from git submodules within the pyrf24 repo. The C++ libs only need to be installed for installing the individual wrappers. WARNINGIf you're going to retry installing the individual python wrappers, you should remove the previously installed C++ RF24 libs from /usr/local/lib & /usr/local/include because the deb/rpm pkgs install to /usr/lib & /usr/include. That way the linker doesn't get confused, and we ensure that the RF24 libs from the deb/rpm pkgs are properly used.
|
PLEASE stop using |
I can reproduce the build error using
With no modifications to the pyrf24 lib. |
After I posted last, I tried building the wheel and it worked.
The example works now:
|
I'm in the process of updating the pyrf24 package. I hope to be able to build and distribute wheels to pypi in the future (see nRF24/pyRF24#6) which would bypass the need to manually build the wheel (and make install much quicker). For now, I'll just change the README to instruct using the |
I built and installed the rf24libs on my RPi 3B+ and my Pi Zero W and it partially worked as described
in https://nrf24.github.io/RF24/md_docs_linux_install.html
My Pi3B can transmit and my PiZero can receive, BUT I cant get the Pi3B to receive and the PiZero to transmit.
Then I tried to build the python3 wrapper on both Pis via steps in https://nrf24.github.io/RF24/md_docs_python_wrapper.html
On the RPi 3B+ I ran "python3 setup.py build" and "python3 setup.py install" in rf24libs/RF24/pyRF24 directory.
and the RF24 module is installed in:
/usr/local/lib/python3.9/dist-packages/RF24-1.4.3-py3.9-linux-armv7l.egg
On the Pi Zero W I ran the same commands and it says it installed the wrapper but I get this error when running
python3 getting_started.py
Both Pis are running Bullseye
When I installed the wrapper on Pi Zero W I got this
The text was updated successfully, but these errors were encountered: