close

[Solved] How to Python –version does not update?

Hello Guys How Are You All ? Hope You all are fine. Today I Have Faced How to Python –version does not update In Python.How to Python –version does not update So Here I am Explain to you all the possible solutions Here.

Without Wasting your time, Lets start This Article to Solve This Error in Anaconda

How to Python –version does not update error Occurs ?


I upgraded and installed latest Python version 3.8.1.

Problem is, when I type

python --version

on terminal I get Python 2.7.16, when I type

python3 --version

I get Python 3.8.1. But if I try to

pip install -U selenium

I get a message:

“DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support”

I dont understand why is it running on Python 2.7

Solutions

  1. How to Python –version does not update?

    the new version of Python (3.9) was released with … And you are not sure which version is for you. … sudo python –version

Solution : 1

Never call the pip or pip3 scripts directly unless you really understand what the implications are.

Instead always prefer calling the exact Python interpreter you are targeting and tell it to run the pip executable module:

  • path/to/my/pythonX.Y -m pip
  • path/to/my/python -m pip
  • path/to/venv/bin/python -m pip
  • pythonX.Y -m pip
  • python3 -m pip
  • python -m pip

I recommend reading Brett Cannon’s article “Why you should use python -m pip“.

Solution : 2


The Python executable is found under the bin directory but the pip executable is under the Scripts directory. Check your path to see which Scripts directory is encountered first ? Most probably it would be the Python 2.7. I encountered the same issue and found that my Python 2.7 Scripts directory was before the Python 3.8 Scripts directory but Python 3.8 bin was before Python 2.7 bin directory in the Path variable.

Summery

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment