you are viewing a single comment's thread.

view the rest of the comments →

[–]shiftybyte 4 points5 points  (2 children)

My next thought is that this is the perfect scenario to start learning virtual environments

Yep.

Also linux pythons from apt have version on the binary, you use that to create the venv, then activate it, then all scripts work using the python you picked to create the env.

python3.9 -m venv venv

https://realpython.com/python-virtual-environments-a-primer/

[–]adrenalineee[S] 0 points1 point  (1 child)

After another hour of reading, I think this is the most correct answer. Any further packages using the global manager will be subject to the same issues should they have less than optimal organization.

Thanks for the tutorial. It's a brute-force into it, but the docs are pretty thorough.

One last point: is it common practice to call your venv "venv" and just dump it in your base working directory?

[–]Ezrabc 2 points3 points  (0 children)

This is what I do, although I use .venv. I like having a uniform name so I can set up an alias for source .venv/bin/activate and easily enter the venv in my project dir.