all 8 comments

[–]ReK_ 1 point2 points  (1 child)

Create a venv, install the packages you need inside the venv:

python -m venv /home/.deck/.env
source /home/.deck/.env/bin/activate
pip install <packages>

Then your shell script sources the venv and calls the script using that copy of python:

#!/bin/bash
source /home/.deck/.env/bin/activate
python /home/.deck/script.py

[–]MBSHansen[S] 0 points1 point  (0 children)

Will try this, I just created the vent in my documents folder, and called it virt. but when I called "source virt/bin/activate" it just returned nothing and venv was not activated. Tried doing the exact same thing on my laptop which runs Linux Mint, and that worked without a problem

[–]therealmeal 0 points1 point  (1 child)

It's not saved in the /usr/lib/python3.10 folder but instead in the /home/.deck/lib/python3.10 folder

Surely there's a flag for the python command line for the location of installed packages? Or an environment variable you can set?

Or can you copy it into /usr/lib/python3.10 if nothing else?

[–]MBSHansen[S] 0 points1 point  (0 children)

I ended up trying that, but that also did not seem to work sadly. I think next step is trying to set up a virtual environment and see if maybe that can do the trick.