Python 3 is the most current version of the language and is considered to be the future of Python. Quick to set up, and written in a relatively straightforward style with immediate feedback on errors, Python is a great choice for beginners and experienced developers alike. First published in 1991 with a name inspired by the British comedy group Monty Python, the development team wanted to make Python a language that was fun to use. Sorry with the bad english, I am just 12 years old.Python is a flexible and versatile programming language that can be leveraged for many use cases, with strengths in scripting, automation, data analysis, machine learning, and back-end development.
The last command I recommended was only useful if you upgrade the pip in /home/YOU/.local/lib/python3.8/site-packages
In QUESTION 3 I recommend to upgrade pip with this command python3 -m pip install -user -upgrade pip If you want to remove the new pip version run pip uninstall pip You can still run pip3 because it is another directory named /home/YOU/.local/bin/pip3 that it will replace the /usr/bin/pip3 Which means it was installed by apt, to remove the older pip package you can run (recommended) sudo apt remove python3-pip Is from /usr/lib/python3/dist-packages/pip When you upgraded pip3 it installed the new pip version in /home/YOU/.local/lib/python3.8/site-packages and it didnt remove the old pip version because it is stored in /usr/lib/python3/dist-packages/pip, the directory /usr/lib/python3/dist-packages/pip you installed the old pip version with apt so it is only apt that can remove the old pip. I don't want to install with get-pip.py - I want the simple solution. So what is the command to upgrade pip3 without installing a separate pip? It didn't - instead it installed pip in parallel with pip3. With pip3 install -upgrade pip I was expecting pip3 to change from 20.0.2 to 20.2.4.
Thus I was confused when in Ubuntu 20.04 I got pip in addition to pip3 - I thought pip is the version for Python 2, which is not installed on my Ubuntu! So after installing pip3 with sudo apt install python3-pip I simply wanted to know how to check/upgrade it (when eventually a new version comes along). I was wrong here :-(Įspecially seeing that "pip for Python 3" and "pip for Python 2" are quoted here:Īs well as "Replace pip3 with pip if using Python 2". Pip 20.2.4 from c:\python39\lib\site-packages\pip (python 3.9)Īha! I thought pip worked only with Python 2 and pip3 with Python 3. In my Windows 10 both pip and pip3 return the same version number: C:\Users\Andrew>pip -version I have both on Windows 10 and only Python 3 on Ubuntu 20.04. My question does not concern my computer - it concerns my documentation for other users that may have a different OS and Python 2 or Python 3 or both installed.
UPDATE - CLARIFICATION - QUESTION RESTATED: (My documentation quotes use of "pip3" as initially "pip" didn't exist and it would be confusing to advise use of "pip" if "pip3" is older!) QUESTION 3: what is "best practice" when upgrading PIP in Python 3. QUESTION 2: how can I remove the older pip version (for consistency)? QUESTION 1: did I upgrade PIP correctly? If not, what is the correct command? Pip3: /usr/bin/pip3 /home/myname/.local/bin/pip3 /home/myname/.local/bin/pip3.8 /usr/share/man/man1/pip3.1.gz Pip: /home/myname/.local/bin/pip whereis pip3 Pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python list includes pip 20.0.2 and Pip 20.2.4 from /home/aendie/.local/lib/python3.8/site-packages/pip (python pip3 -version Successfully installed I now have two different versions of pip installed (without Python 2.7): pip -version I entered pip3 install -upgrade pip wanting to check/upgrade pip3: pip3 install -upgrade pipĭownloading pip-20.2.4-py2.p圓-none-any.whl (1.5 MB)
I use "pip3" always as "pip" doesn't exist and it reminds me that only Python 3 is installed (by default). I once installed PIP with sudo apt install python3-pip. I have a clean installation with Ubuntu 20.04 and use Python3.