led-shim icon indicating copy to clipboard operation
led-shim copied to clipboard

Not working with latest Raspberry Pi OS 64bit

Open bobster316 opened this issue 3 years ago • 18 comments

I have never had any issues with ledshim working with raspberry pi os 32 bit.

I just upgraded my raspberry pi 4 to the latest raspberry pi os 64bit.

When i try to run the install script i get the following error, can you please help to advise/

pi@raspberrypi:~ $ sudo curl https://get.pimoroni.com/ledshim | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 38790 100 38790 0 0 180k 0 --:--:-- --:--:-- --:--:-- 180k

This script will install everything needed to use LED SHIM

Always be careful when running scripts and commands copied from the internet. Ensure they are from a trusted source.

If you want to see what this script does before running it, you should run: 'curl https://get.pimoroni.com/ledshim'

This hardware is not supported, sorry! Config files have been left untouched

bobster316 avatar Feb 04 '22 16:02 bobster316

I think 64bit Raspbian is identifying as "debian" and breaking our creaky old installer scripts, what do you see when you run lsb_release -a?

These install scripts can be largely ignored if you just python3 -m pip install ledshim and grab the examples from here.

Gadgetoid avatar Feb 07 '22 10:02 Gadgetoid

Hi Philip

Please see below based on your email

@.:~ $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye @.:~ $

@.:~ $ python3 -m pip install ledshim Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting ledshim Downloading https://www.piwheels.org/simple/ledshim/ledshim-0.0.2-py3-none-any.whl (8.3 kB) Installing collected packages: ledshim Successfully installed ledshim-0.0.2 @.:~ $

What do i do next?

On Mon, Feb 7, 2022 at 10:04 AM Philip Howard @.***> wrote:

I think 64bit Raspbian is identifying as "debian" and breaking our creaky old installer scripts, what do you see when you run lsb_release -a?

These install scripts can be largely ignored if you just python3 -m pip install ledshim and grab the examples from here.

— Reply to this email directly, view it on GitHub https://github.com/pimoroni/led-shim/issues/14#issuecomment-1031283690, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXW6MDFAC4KVURDOZDEK6LUZ6KMTANCNFSM5NSGEVNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

bobster316 avatar Feb 07 '22 12:02 bobster316

I have updated the installer so it should now forge ahead instead of throwing the unsupported message.

Gadgetoid avatar Feb 07 '22 12:02 Gadgetoid

so did you get it working? i just cannot get it running in any way :/ would appreciate every bit of help thx

4lxAnd3r avatar Feb 10 '22 23:02 4lxAnd3r

@4lxAnd3r are you encountering any specific errors?

Gadgetoid avatar Feb 11 '22 07:02 Gadgetoid

I’m trying to use it on a Pi5 with the 64-bit Bookworm release and I can’t get it working. It doesn’t even download the examples. (Reminder to myself to post the output of the install text when I’m back at home on my computer). Can anyone help?

EpicallyJess avatar Feb 04 '24 15:02 EpicallyJess

Hopefully this will be fixed by https://github.com/pimoroni/led-shim/pull/15

I can't for the life of me find an LED Shim to test with- I think mine's soldered to a Pi Zero somewhere.

Gadgetoid avatar Feb 08 '24 14:02 Gadgetoid

I have 2 unsoldered. I live in Ontario Canada; wish i could send to you to test. I'm an uneducated pleb when it comes to coding and even the structure for following updates on a forum like this. Is there anything I can do to help? Would happily follow instructions to test for you.

On Thu, Feb 8, 2024 at 9:48 AM Philip Howard @.***> wrote:

Hopefully this will be fixed by #15 https://github.com/pimoroni/led-shim/pull/15

I can't for the life of me find an LED Shim to test with- I think mine's soldered to a Pi Zero somewhere.

— Reply to this email directly, view it on GitHub https://github.com/pimoroni/led-shim/issues/14#issuecomment-1934277636, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOX3KZREAOOBZ2ZTRCHDIJ3YSTQUVAVCNFSM5NSGEVN2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTGQZDONZWGM3A . You are receiving this because you commented.Message ID: @.***>

EpicallyJess avatar Feb 08 '24 14:02 EpicallyJess

Thank you, and no worries- I'm sure one will turn up in the office. I think it's been out of production a while and I am not the most organised!

You should be able to hopefully - and easily... famous last words - install the software like so-

git clone https://github.com/pimoroni/led-shim -b repackage
cd led-shim
./install.sh --unstable

This should work on Bookworm since it sets up a virtual environment for you. Or it should, anyway!

Once installed you may need to activate the virtual environment (sigh) for the Python examples to work-

source ~/.virtualenvs/pimoroni/bin/activate

Let me know if you have trouble at any point- these are supposed to be easy(ish) to install, so you'll probably catch problems I've overlooked.

Gadgetoid avatar Feb 08 '24 15:02 Gadgetoid

Oh wait hold up, I have totally flubbed the repackaging and it wont work!

Gadgetoid avatar Feb 08 '24 15:02 Gadgetoid

Two separate code snippets...

@.***:~/led-shim $ source ~/.virtualenvs/pimoroni/bin/activate

-bash: /home/epicallyjess/.virtualenvs/pimoroni/bin/activate: No such file or directory

@.***:~/led-shim/examples $ python cpu_temp.py

Traceback (most recent call last):

File "/home/epicallyjess/led-shim/examples/cpu_temp.py", line 6, in

import ledshim

ModuleNotFoundError: No module named 'ledshim'

On Thu, Feb 8, 2024 at 10:10 AM Philip Howard @.***> wrote:

Thank you, and no worries- I'm sure one will turn up in the office. I think it's been out of production a while and I am not the most organised!

You should be able to hopefully - and easily... famous last words - install the software like so-

git clone https://github.com/pimoroni/led-shim -b repackage cd led-shim ./install.sh --unstable

This should work on Bookworm since it sets up a virtual environment for you. Or it should, anyway!

Once installed you may need to activate the virtual environment (sigh) for the Python examples to work-

source ~/.virtualenvs/pimoroni/bin/activate

Let me know if you have trouble at any point- these are supposed to be easy(ish) to install, so you'll probably catch problems I've overlooked.

— Reply to this email directly, view it on GitHub https://github.com/pimoroni/led-shim/issues/14#issuecomment-1934323194, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOX3KZXZSEDMKS4GHNU45Q3YSTTH7AVCNFSM5NSGEVN2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTGQZTEMZRHE2A . You are receiving this because you commented.Message ID: @.***>

EpicallyJess avatar Feb 08 '24 15:02 EpicallyJess

Oh, ok. Standing by on any updates.

On Thu, Feb 8, 2024 at 10:17 AM Philip Howard @.***> wrote:

Oh wait hold up, I have totally flubbed the repackaging and it wont work!

— Reply to this email directly, view it on GitHub https://github.com/pimoroni/led-shim/issues/14#issuecomment-1934338691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOX3KZSP6ZQ5JO5DCFHRUODYSTT7LAVCNFSM5NSGEVN2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTGQZTGOBWHEYQ . You are receiving this because you commented.Message ID: @.***>

EpicallyJess avatar Feb 08 '24 15:02 EpicallyJess

So, another noob question... how do I roll back the installation?

EpicallyJess avatar Feb 08 '24 15:02 EpicallyJess

It should be working now.

Basically the installation when it works properly is entirely self contained within the ~/.virtualenvs/pimoroni virtual environment. This is just a folder that, by means of some whacky PATH manipulation, just appears to Python as the Python/modules location for your system.

You activate an environment with source ~/.virtualenvs/<the directory it lives in>/bin/activate and deactivate it by typing deactivate.

I've opted to use the pimoroni environment across all of our installers, but you can:

  1. Uninstall everything by just removing that virtual env folder
  2. Uninstall a specific module by activating it, and using pip uninstall X

Since the installer is currently too broken to really do anything with system Python, you probably won't have anything to roll back yet.

Note: I've written more than anyone would care to know about virtual environments here - https://github.com/pimoroni/boilerplate-python/pull/13

I also started, but didn't get anywhere much with, this: https://pimoroni.github.io/venv-python/

It's easier (if we take liberties with the word easy), generally, just to:

sudo apt install virtualenvwrapper python3-virtualenvwrapper

And then add /usr/share/virtualenvwrapper/virtualenvwrapper.sh to your ~/.bashrc.

This makes the command for switching to a particular virtual environment just:

workon <virtual env name>

And is what I use generally for not going mad while developing.

Gadgetoid avatar Feb 08 '24 15:02 Gadgetoid

I'm thinking this is way over my head. I'm not sure how to do what you're saying,.

EpicallyJess avatar Feb 15 '24 19:02 EpicallyJess

Still having difficulty with this. I think I'm gonna give up.

On Thu, Feb 8, 2024 at 10:27 AM Philip Howard @.***> wrote:

It should be working now.

Basically the installation when it works properly is entirely self contained within the ~/.virtualenvs/pimoroni virtual environment. This is just a folder that, by means of some whacky PATH manipulation, just appears to Python as the Python/modules location for your system.

You activate an environment with source ~/.virtualenvs//bin/activate and deactivate it by typing deactivate.

I've opted to use the pimoroni environment across all of our installers, but you can:

  1. Uninstall everything by just removing that virtual env folder
  2. Uninstall a specific module by activating it, and using pip uninstall X

Since the installer is currently too broken to really do anything with system Python, you probably won't have anything to roll back yet.

— Reply to this email directly, view it on GitHub https://github.com/pimoroni/led-shim/issues/14#issuecomment-1934368253, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOX3KZTGSG3AYYVBXLUQLV3YSTVGDAVCNFSM5NSGEVN2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJTGQZTMOBSGUZQ . You are receiving this because you commented.Message ID: @.***>

EpicallyJess avatar Mar 04 '24 16:03 EpicallyJess

There should not be any need to roll it back. Just running the latest installer should, in theory, give you an environment with the library installed and ready to go.

You do need to make sure you've activated that new environment, though, which you can normally do - for our software - by typing the following into a command-line:

source ~/.virtualenvs/pimoroni/bin/activate

This will activate the environment once for your current user session in the terminal into which you typed it. This means you'll need to run scripts from this command line in order for them to work.

(Currently Thonny will also not see any library installed via pip using this method, for bonus frustration.)

Yes this is convoluted and frustrating and tedious and difficult to explain and a brick wall to beginners who just expect to be able to install things and have them work. I'm stuck just trying to figure out better ways to work around it.

Gadgetoid avatar Mar 05 '24 13:03 Gadgetoid

I never did get anywhere with this. I'm wondering if I should just go to the 32-bit OS so there's no issues. Oh well.

EpicallyJess avatar Jul 17 '24 14:07 EpicallyJess