1

Using pip I am only able to uninstall for a few versions. I am fairly new to this, so please let me know if there is some way of deleting it. I am currently using Ubuntu 20.04. I had previously installed the packages with pip itself. But now pip no longer points to those versions. I tried commands like pip3.6 uninstall package python3.6 -m pip uninstall package

but none of that is even being recognised as a command. I do not wish to uninstall the python installation itself, just the various packages that I installed by myself when using those various versions.

I have installed python3.6 version as I can see it under my /usr and home directory, however when I run this python3.6 -m pip -V or python3.6 -m pip list I get the following output

Command 'python3.6' not found, did you mean:

command 'python3.9' from deb python3.9 (3.9.0-5~20.04) command 'python3.8' from deb python3.8 (3.8.5-1~20.04.2)

Try: sudo apt install <deb name>

AG99
  • 11
  • It's pip uninstall package and pip3 uninstall package not pip3.6 uninstall package this is also related . – Raffa Feb 27 '21 at 16:00
  • I have tried that too, but pip3 points to my python 3.8 installation – AG99 Feb 27 '21 at 17:01
  • You'd be crazy uninstalling anything beginning with "P" and ending in "ython". – WinEunuuchs2Unix Feb 28 '21 at 01:44
  • What does python3.6 -m pip -V and python3.6 -m pip list return? Please [edit] your question to add the output. – Raffa Mar 01 '21 at 08:27
  • @Raffa, I have edited the question. – AG99 Mar 08 '21 at 06:42
  • python3.6 is not present on your system or not configured / linked correctly. You appear to have python3.8 and python3.9. Given this information, I suggest you leave the installed python packages and read this – Raffa Mar 08 '21 at 08:53

1 Answers1

3

Do not - ever - remove a python version if you did not install it yourself. Ubuntu has tons of scripts running in python - therefore it needs a defined python environment. There are a lot of "I've removed python now I have a problem" questions in this forum - due to a removal of the "official" python environment.

You always can install additional versions via pip and remove them. And you can set those as default version

Edit Just of today python V3.8.5 is the current "offical" version of Ubuntu 20.04

kanehekili
  • 6,402
  • As I understand it .... The OP does not want to uninstall any python version. They want to remove packages they previously manually installed pip and no longer need. +1 – Raffa Feb 28 '21 at 05:09
  • 1
    Yes, I do not intend to remove the python installation just some packages that I installed on my own when I was using that version of python such as TensorFlow which is eating up a lot of space. – AG99 Mar 01 '21 at 06:27