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-packages
Now 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 usevenv
oruv
to create virtual environments.
Here is a quick cheatsheet forvenv
=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuv
these days, see => https://github.com/astral-sh/uv -
Hello @imc67
Since the--user
flag 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
/run
is 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--user
flag 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
/run
is 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 usevenv
oruv
to create virtual environments.
Here is a quick cheatsheet forvenv
=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuv
these days, see => https://github.com/astral-sh/uv -
Hello @imc67
You can usevenv
oruv
to create virtual environments.
Here is a quick cheatsheet forvenv
=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuv
these days, see => https://github.com/astral-sh/uv@james said in Is this pip install persistent for app updates?:
Hello @imc67
You can usevenv
oruv
to create virtual environments.
Here is a quick cheatsheet forvenv
=> https://aaronlelevier.github.io/virtualenv-cheatsheet/
Many preferuv
these 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
-
I imc67 has marked this topic as solved