pyliblo3 wheel error on raspberry pi install

Alon Danan's icon

Hi!

trying to make this: https://rnbo.cycling74.com/learn/working-with-photoresistors-ldrs-on-the-raspberry-pi-with-rnbo

whenever trying to run the Pyliblo code. an error occurs in the wheel building stage.

installed liblo-dev but still same issue occurs.

Thanks:)

Patrakorn Bhadranavik's icon

same :(

Have you got any update yet?

Sjoerd's icon

Same. Anyone found a solution yet?

Jan M's icon

I did install quite a while ago pyliblo3 on two RasPis. However trying to to it on a new one today I couldn't get it to work. I believe there are some underlying problems with the underlying c library (liblo), the python wrapper and the Cython module that does the wrapping. After almost a day of trying to find compatible versions I gave up and moved to another Python library: pythonosc

It is pure Python and does not depend on external c libraries. It is documented here : https://python-osc.readthedocs.io/en/latest/

you can it install via "pip install pythonosc" first test seem fine


Jan M's icon

I found a way to make pyliblo3 working.

The problem with the current version is that it is not compatible with the current Cython version 3.x.

Pinning the Cython version to 0.29.x does the trick:

here's the full install sequence:

sudo apt-get install liblo-dev
pip install Cython==0.29.36
pip install pyliblo3

Gabriel9's icon

Thanks Jan, the compatibility issue is still there and your solution is still working.

Gab

Jan M's icon

Great that it works for you!

Jan Ove's icon

I've been pulling my hair out, as the suggestion provided by Jan just results in a different error message:

error: externally-managed-environment

It seems like another workaround is installing pyliblo3 via git using the following commands:

git clone https://github.com/gesellkammer/pyliblo3
cd pyliblo3
sudo apt install

At least now I it appears if I check with the command

pydoc-modules

Fingers crossed this has actually worked!

UPDATE: it didn't work, and resulted in the following error message after loading the RNBOPi_LDR.py file:

ModuleNotFoundError: No module named 'liblo'

Eduardo Moguillansky's icon
pyliblo3 author here. When installing from source (there are currently no wheels for raspberry pi) you need to install liblo itself before installing pyliblo3.  Either via apt (apt install liblo-dev) or from source:

git clone https://github.com/radarsat1/liblo 
cd liblo mkdir build && cd build 
cmake ../cmake 
cmake --build . --config Release 
sudo cmake --install . 

Then install via:

git clone https://github.com/gesellkammer/pyliblo3
cd pyliblo3
pip install .

The error "error: externally-managed-environment" does not have to do with pyliblo3 but with the fact that you are modifying your system python installation. The solution here is to use a virtual environment.



Then install via