Skip to content

Error in install - error: externally-managed-environment #10

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

Closed
78davidcross opened this issue Jan 5, 2025 · 7 comments
Closed

Error in install - error: externally-managed-environment #10

78davidcross opened this issue Jan 5, 2025 · 7 comments

Comments

@78davidcross
Copy link

Hello,

Thanks for this, but I'm getting an error when running the install.sh

image

I've tried running the below commands to set up a virtual environment but the error remains:
python3 -m venv ~/py_envs
source ~/py_envs/bin/activate

Any help appreciated as I'm a little out of my depth now

Regards,
David.

@tofuSCHNITZEL
Copy link
Owner

Hi,
what is the output of: sudo apt list --installed

@78davidcross
Copy link
Author

Hi, what is the output of: sudo apt list --installed

Hello. Listing attached.
Installed.txt

@tofuSCHNITZEL
Copy link
Owner

Thanks, what happens if you just run python3 -m pip install . after you enabled the environment and change to the rpi-screenbrightness-mqtt directory with the pyproject.toml file?

@78davidcross
Copy link
Author

So that appears to have "completed" in that there were no errors.

I don't find a rpi_screenbrightness_mqtt.conf under /etc, it only appears here: /home/piuser/rpi-screenbrightness-mqtt/assets

The service isn't showing as registered\running.

@tofuSCHNITZEL
Copy link
Owner

yea this installs it in the venv so its not usable outside with the normal systemd service...
basically some/any of your python package that was installed via the system package manager conflicts with the packages this project needs to install...

maybe the only option for you is to add "--break-system-packages" to Line 18 in install.sh

@rg2k
Copy link

rg2k commented Jan 22, 2025

yea this installs it in the venv so its not usable outside with the normal systemd service... basically some/any of your python package that was installed via the system package manager conflicts with the packages this project needs to install...

maybe the only option for you is to add "--break-system-packages" to Line 18 in install.sh

This fixed the issue for me. It did fail starting the service for the first time - but after the config change, all is working.

@tofuSCHNITZEL
Copy link
Owner

Glad to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants