I use Pop!_OS, and these systems have a default Python installed. I recently learned that it is better to first set up a python virtual environment (python -m venv venv
) and install all your additional libraries in it, instead of installing the libraries on the default version.
Now I am thinking of removing all the libraries I have installed, and start fresh on separate python virtual env. The code I found to do this is : pip freeze | xargs pip uninstall -y
.
My question is, is this even something I should do? My only goal is to have clear paths set up for each library instead of having multiple path conflicts for one library, and also not get permission errors and avoid using sudo
when removing a library. What is a good practice so I won’t end up with more convoluted issues in the long-run. Any suggestions would be appreciated, thank you!