Do I need to have python venv set up to install and use apps like pywal and wpgtk
Basically the title. I have one set up and have installed pywal and wpgtk using ‘pip install .
‘ But it’s installing the apps into ~/.venv/bin
(as opposed to .local/bin) and ~/.venv/bin is not in my path unless the virtual env is activated.
I’m confused on how I can set this up properly. Right now I’ve added ~/.venv/bin to my path to get these apps to work.
Any help/advice would be appreciated.
Thanks.
Ubuntu 23.10.1
There are two way to run a Python script relying on Python modules installed within the venv:
- activate the venv and then run the Python script
- Call the Python interpreter from the venv with its full path and give the full path to the file execute.
On the latter: let’s assume your venv is ~/myvenv and your script is at ~/myvenv/my_cool_script.py. Calling ~/myvenv/bin/python3 ~/myvenv/my_cool_script.py
will run the script with all modules accessable installed within myvenv.
In case you are only looking to run Python executables installed within a venv, you may want to take a look at pipx.