Is this pip install persistent for app updates?
-
For a specific script (check via API the mail logs if there is a S3150 Micros$%t bounce) I needed this:
pip3 install --user requests --break-system-packagesNow the script works perfectly and via cron checks every hour the logs and informs via Pushover. However is this specific pip install persistent over app restart / update?
-
Hello @imc67
You can usevenvoruvto create virtual environments.
Here is a quick cheatsheet forvenv=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuvthese days, see => https://github.com/astral-sh/uv -
Hello @imc67
Since the--userflag installed packages as a user, when you run this in the LAMP as root, it will install packages into/root/.local/lib/python3.12/site-packages/
And since/root/.local/is a symbolic link to/root/.local -> /run/root.local/runis not included in the backup.What you want to do is create a virtual environment with pip in
/app/data/and use that environment.
That will be included in the backup. -
Hello @imc67
Since the--userflag installed packages as a user, when you run this in the LAMP as root, it will install packages into/root/.local/lib/python3.12/site-packages/
And since/root/.local/is a symbolic link to/root/.local -> /run/root.local/runis not included in the backup.What you want to do is create a virtual environment with pip in
/app/data/and use that environment.
That will be included in the backup.@james said in Is this pip install persistent for app updates?:
What you want to do is create a virtual environment with pip in
/app/data/and use that environment.
That will be included in the backup.Thanks for your feedback! Can you advise on what command to use to create this?
-
Hello @imc67
You can usevenvoruvto create virtual environments.
Here is a quick cheatsheet forvenv=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuvthese days, see => https://github.com/astral-sh/uv -
Hello @imc67
You can usevenvoruvto create virtual environments.
Here is a quick cheatsheet forvenv=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuvthese days, see => https://github.com/astral-sh/uv@james said in Is this pip install persistent for app updates?:
Hello @imc67
You can usevenvoruvto create virtual environments.
Here is a quick cheatsheet forvenv=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuvthese days, see => https://github.com/astral-sh/uvthanks again! I used venv and it works very well!
-
I imc67 marked this topic as a question on
-
I imc67 has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login