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

As systemd service vs. modern python venv deployment? #700

Open
Matthias84 opened this issue Dec 17, 2024 · 1 comment
Open

As systemd service vs. modern python venv deployment? #700

Matthias84 opened this issue Dec 17, 2024 · 1 comment

Comments

@Matthias84
Copy link

Hi ther,e, I'm pretty happy by invoking mqttwarn manually 😄

But I tried to transform it to a working systemd service, based upon mqttwarn.service unit example. Unfortunatly modern Debian based OS omit the unmanaged use of pip and encourage you to make use of a virtualenv isolation. Unfortunatly this isn't covered by the .service example file and I strugle to invoke the python interpreter from this venv with the correct mqttwarn source?

P.S. Where are this example files are stored if you just pip install mqttwarn in a venv?

@amotl
Copy link
Member

amotl commented Dec 26, 2024

Hi @Matthias84. Thanks a stack for writing in. The designated way to install Python programs on Linux after distributions rightfully started to reject letting pip install things into system directories, is to use pipx instead.

On Debian, it can be installed using apt install pipx, at least on more recent versions of Debian, see 1.

docker run --rm -it debian:bookworm bash
export PATH=$PATH:/root/.local/bin  # Needs to go into ~/.bashrc.
apt install pipx
pipx install mqttwarn
mqttwarn --version
mqttwarn 0.35.0

Footnotes

  1. https://packages.debian.org/search?keywords=pipx

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

2 participants