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

Install instructions broken for pip installation #153

Open
guw opened this issue Jun 23, 2024 · 4 comments
Open

Install instructions broken for pip installation #153

guw opened this issue Jun 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@guw
Copy link

guw commented Jun 23, 2024

Something changed how RPi handles Python packages. Following the install instructions runs into an error:

/opt/RPi-Reporter-MQTT2HA-Daemon $ sudo pip3 install -r requirements.txt
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

It looks like a virtual environment should be used now.
https://www.raspberrypi.com/documentation/computers/os.html#python-on-raspberry-pi

@guw guw added the bug Something isn't working label Jun 23, 2024
@bsimmo
Copy link

bsimmo commented Jun 23, 2024

Yep, OS version 'bookworm' causes this.
#113

There are a few other one too.

@Fontheweg
Copy link

Hej,
I don't get it working :(
Is it possible to get a little guidance about the installation with Bookworm?
I just created an virtual environment, but I don't get it to install the requisits to it. And I guess that I have to modify some Lines in the code to get it working :|

@koira
Copy link

koira commented Aug 24, 2024

yes, I'd also appreciate guidance as to how to install under bookworm... thanks in advance!

EDIT: thanks, found it under the #113 link above.

@Adarack
Copy link

Adarack commented Dec 17, 2024

I don't know if this will help anyone, I made an ansible playbook to automate this process for me. It allowed me to set this up on several Pi's very quickly.

https://github.com/Adarack/Ansible-Playbooks-Public/tree/main/RPi-Reporter-MQTT2HA-Daemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants