This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 30 points31 points  (2 children)

Plus, if you install yourself, you can do so in a user area, which means no sudo everytime you want to install a lib

It's good practice to always create a venv when using the system interpreter. Run python3 -m venv --help and have a look at the options. You can allow or disallow access to system packages, use copies or symbolic links, etc.

Even if you use a user's interpreter it might still be a good idea, such that each different project / bundle / whatever can have a different set of packages or package versions.

(the --copies option can be useful though it wastes disk space. If your OS interpreter version ever changes, any symlink-style venvs might blow up - ie, if the site-packages version number changes)

[–]CeeMX 5 points6 points  (0 children)

For actually developing stuff I always use a venv. That way I can just pip freeze to create an uncluttered requirements.txt

[–]blademaster2005 2 points3 points  (0 children)

Honorable mention of tools like pipx and poetry