Open Skidude240 opened 8 months ago
lgpio’s Python package stubbornly remaining a broken waste of time is why I set up this repository and tagged those releases to propose and demo solution. The problem as yet remains unsolved.
Unfortunately I don’t maintain lgpio or the Python package so I’m afraid the best I can offer you - short of suggesting you try installing the contents of this repo which might work - is some company in your misery! Sorry.
I’m surprised those release files don’t work, though, could have sworn I tested them.
The actual source and maintainer can be found here: https://github.com/joan2937/lg
But afaik they abdicated responsibility for the Python package to gpiozero, so there’s a fork here too: https://github.com/gpiozero/lg
I’d say you’re better using the official gpiod package (which is the route I eventually took), but that has its own set of challenges.
Welcome to my special little hell! 😭
Okay I can’t imagine this helps 😫
https://github.com/Gadgetoid/PY_LGPIO/blob/bed52742da0ff24a8e8c14f718db1c0f306d6c3f/setup.py#L20
I've, hopefully, fixed up all of the source releases here so they should work for your purposes.
This is a short term kludge only. Please join me in complaining here 😆 - https://github.com/gpiozero/lg/pull/1
Thanks, that change has fixed the problem. interesting that Pip managed to kinda install the module but not really. I've added a comment to the thread you linked
I am currently trying to get GPIO access working on a RPi 5 in python running Ubuntu 23.10 server.
Before i started i checked that everything was working with the os python and i can import lgpio fine. Pip reports the version as 0.2.0.0.
I tend to use Pyenv and virtualenv to manage my python versions and projects to keep dependencies clean. So in a python 3.10.13 i used
pip install lgpio
to install the module however pip installs version 0.0.0.2.I tried forcing other versions but i can get 0.2.0.0 to install.
Next i tried installing from the tar.gz file directly. i tried both 0.2.2.0 and 0.2.0.0. In both cases the install works but the module cannot be imported. It appears that when installing from the tar.gz the module lgpio.py is not actually copied into the site packages.
I noticed this when i downloaded, unpacked and installed the package.
To double check i tried to install the same tar.gz file locally using
pip install <path>/lgpio-0.2.2.0.tar.gz
and again the lgpio.py file was missing.