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
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?