Skip to content
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

Not working with latest Raspberry Pi OS 64bit #14

Closed
bobster316 opened this issue Feb 4, 2022 · 19 comments
Closed

Not working with latest Raspberry Pi OS 64bit #14

bobster316 opened this issue Feb 4, 2022 · 19 comments
Labels
64bit 64bit Raspbian Issue

Comments

@bobster316
Copy link

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

@Gadgetoid
Copy link
Member

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 Gadgetoid added the 64bit 64bit Raspbian Issue label Feb 7, 2022
@bobster316
Copy link
Author

bobster316 commented Feb 7, 2022 via email

@Gadgetoid
Copy link
Member

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

@4lxAnd3r
Copy link

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

@Gadgetoid
Copy link
Member

@4lxAnd3r are you encountering any specific errors?

@EpicallyJess
Copy link

EpicallyJess commented Feb 4, 2024

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?

@Gadgetoid
Copy link
Member

Hopefully this will be fixed by #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.

@EpicallyJess
Copy link

EpicallyJess commented Feb 8, 2024 via email

@Gadgetoid
Copy link
Member

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
Copy link
Member

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

@EpicallyJess
Copy link

EpicallyJess commented Feb 8, 2024 via email

@EpicallyJess
Copy link

EpicallyJess commented Feb 8, 2024 via email

@EpicallyJess
Copy link

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

@Gadgetoid
Copy link
Member

Gadgetoid commented Feb 8, 2024

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 - pimoroni/boilerplate-python#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.

@EpicallyJess
Copy link

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

@EpicallyJess
Copy link

EpicallyJess commented Mar 4, 2024 via email

@Gadgetoid
Copy link
Member

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.

@EpicallyJess
Copy link

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.

@thirdr
Copy link

thirdr commented Jan 8, 2025

Closing this to clear our decks for the new year, if it's still troubling you please re-open! :)

@thirdr thirdr closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
64bit 64bit Raspbian Issue
Projects
None yet
Development

No branches or pull requests

5 participants