I upgraded from Ubuntu 20.10 to 21.04 & the python version changed from 3.8 to 3.9. In 20.10 I installed many python modules using pip & they are at /usr/local/lib/python3.8/dist-packages/ & they are occupying a lot of space so I tried sudo pip uninstall name but pip says no such module installed even if it is there at /usr/local/lib/python3.8/dist-packages/ I think it searches it only in /usr/local/lib/python3.9/dist-packages/ which were installed in 21.04 so how do I tell pip to remove python modules from python version 3.8?
1 Answer
Every Python has own pip and check if you can do
pip3.8 uninstall ...You can also try
python3.8 -m pip uninstall ...If you don't have pip3.8 and there is no python3.8 then system doesn't use this version and you can simply delete folder
sudo rm -R /usr/local/lib/python3.8Using pip -V you can see for what version it works. The same python -V show python version.
If you have many versions installed (ie. 2.7, 3.8, 3.9) then you should have programs python2,python2.7, python3, python3.8, python3.9 and pip2, pip2.7, pip3, pip3.8, pip3.9