Home > Back-end >  not able to uninstall python and get python 3
not able to uninstall python and get python 3

Time:09-11

i just started using python and i use VS Code.

When i do

python --verion

i get python version 2

py --version

i get python version 3

i wanted to install networkx which turned out to only work with python version 3. I did multiple things to change python version to 3 but could not.

So i decided to uninstall python and went to control panel and uninstalled

python
python launcher

and restarted the computer.

But when i run

python --version

it still shows up python 2.7.18

and this is my where python output

enter image description here

can anyone please help me to understand whats going on and how can i get python 3 to my system.

[![enter image description here][2]][2]

CodePudding user response:

In windows If you do not have correct environment variable set then this is likely to cause the problem.

On your Powershell if you type $env:path or on command prompt echo %PATH%

you shall see your environment variable path which you have set,

where-in, either you may not have path to directory of Python 3 or you have it appended after Python2.

i.e.:

if your result show up as (... could be other paths in your variable) then only you will get python.exe to be pointing to your Python3 path:

...
C:\Python38\Scripts;C:\Python38;
...
C:\Python27\Scripts;C:\Python27\;
...

CodePudding user response:

You can download anaconda launcher and it has many python environments like jupyter notebooks or spyder with python 3 support

  • Related