nRF24 / RF24

OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
https://nrf24.github.io/RF24
GNU General Public License v2.0
2.21k stars 1.02k forks source link

./setup.py build does not compile #507

Closed imohammad74 closed 4 years ago

imohammad74 commented 5 years ago

Hello, Thanks for your library,I finally after 2 weeks can connected Arduino to RPi 3 b+. I follow your doc ,
in this step ./setup.py build i get below error:

Traceback (most recent call last):
  File "./setup.py", line 39, in <module>
    process_configparams()
  File "./setup.py", line 14, in process_configparams
    with open('../Makefile.inc') as f:
IOError: [Errno 2] No such file or directory: '../Makefile.inc'

I changed Makefile to Makefile.inc and solved this error, But when try ./setup.py build again , i get this error:

Traceback (most recent call last):
  File "./setup.py", line 39, in <module>
    process_configparams()
  File "./setup.py", line 19, in process_configparams
    identifier, value = line.split('=', 1)
ValueError: need more than 1 value to unpack

Could you please help me fixed it?

architeuthisss commented 5 years ago

I think your problem is because Makefile references Makefile.inc, so changing Makefile to Makefile.inc makes Makefile reference itself.

michz commented 4 years ago

Hi @imohammad74 , For me it helped to build the library itself before trying to build the python wrapper:

git clone https://github.com/nRF24/RF24.git
cd RF24.git
./configure
make
sudo make install
cd pyRF24
./setup.py build
sudo ./setup.py install

The doc is probably missing a note that you have to build the library itself before.