3 ms·
If you scroll down in the linked article it says: > ALWAYS use an environment! Don't install into your global interpreter! ... > When you need to create an e
by nl 4y ago
If you scroll down in the linked article it says:
> ALWAYS use an environment! Don't install into your global interpreter!
...
> When you need to create an environment for a project I personally always reach for venv and virtual environments. It's included in Python's stdlib so it's always available via python -m venv (as long as you are not on Debian/Ubuntu, otherwise you may have to install the python3-venv apt package)
I think this is good advice, and it's pretty easy to do, and you can have named environments (via directory names) for each version you can switch between easily.
Very occasionally some python libraries will use a globally installed system library or a particular version which changes per python version (I think maybe OpenCV has this problem on Windows or something?) and so then you have to reach for containers.
- martopix 4y agoEnvironments don't help you if you want to use different versions of Python.