#Python Packages

1 messages · Page 1 of 1 (latest)

tardy creek
#

https://forums.linuxmint.com/viewtopic.php?t=457778

I asked on the fourms, the link has all the info but I feel like id get some hostility if I ask followup questions, because I do not understand at all how I am supposed to get this to work. He told me what I was doing wrong, but I am at a loss on what I should do right.

tardy creek
#

:")

astral shale
#

Ale you sure you want to install it system-wide? I never install nonstandard packages in system python. The solution with virtual env is not bad.

autumn furnace
#

You must and should use venvs.

#

It takes 5 seconds to set up one.

#

I personally keep a folder in my ~/ called PythonProjects where i keep all my venvs

autumn furnace
#

Run python3 -m venv /home/$USER/my/project/path/.venv

This will create a directory named .venv in your project folder. Then, simply activate it with source /home/$USER/my/project/.venv/bin/activate.

Done. Now install packages with pip and run your files with python3. To deactivate it simply run deactivate.

Note that you must either run your files while the venv is active or by passing your scripts to the interpreter in /home/$USER/my/project/path/.venv/bin/python3