getting the wrong version of python - python-3.x

I have installed python 3.6 on my laptop but when I run the version command I get the 2.7 version. I have changed the path variable and still get the same result and the funny thing is that I don't even have python 2.7 installed on my laptop.
here is the image path variable and version also when I run python in cmd I get the error run error any help will be much appreciated

Typing:
where -a python
shows you the order in which the command
python
is found on your path.
Use:
which -a python
on unix-like systems such as Linux or MacOS X.

Related

Showing python 2.7.12 for python 3.9.1 on Command window?

I am using python 3.9.1 on my computer and when I try this command on cmommand windows : python -- version , I come up with 2.7.12 !!! And it does not show the version correct.
I uninstalled python and removed all the related files on C drive as well as environmental Variables...
Now I don't have python but it still shows the version 2.7.12 when I ask for Command windows!!!
Does anyone know what is the problem ????
if you have both versions then you should write python2 --version o
Go to my computer, right click and then properties. Here go to Advanced System setting
and at the bottom of the window open Environment Variables and check any variable having python on it. if there are two variable maybes this is the problem.
Also go to the app data on your windows and check files if there is a file related to the older version of python.
Good Luck.
You can use PowerShell instead of cmd as well try this one after checking the variables.

how to verify whether latest python version installed properly

when I try to check python version in Centos7 by typing command
1) python --version
-bash: /usr/local/bin/python3.6: No such file or directory
OR
2) which python
"alias python='/usr/local/bin/python3.6'.
Could anyone explain me why it shows like this instead of showing python version?
Thanks.
In order to sum up, for future people who will look in this question:
when installing different versions of python on linux using package manager (in this case yum because you are using CentOS, but it might be apt or something else) linux installs the side-by-side, meaning you have all of the versions installed together.
If you want to use a specific version other than your linux distribution diffault one you need to call it explicitly (i.e. python3.6 or python3.8)
Make sure you are looking for the wanted python version on the right path.
When you want to run some version of python after installing it I suggest you to just write python in the bash and just hit tab+tab and the bash will suggest all the installed versions in the $PATH.

Juno/Atom Python version different from terminal and REPL Python version

I am running Ubuntu 16.04 and my version of Python points to version 3.5, however the one in Atom points to 2.7. Does anybody know how I can change that?
So the python --version in terminal gives me:
Python 3.5.2 :: Anaconda 4.2.0 (64-bit)
and ;python --version in Atom's console gives me:
Python 2.7.12
I use Atom for Julia.
I am using Juno and PyCall.
If you want to specify the version of Python used by PyCall, you can find help in the documentation here.
I am not certain if that is your actual problem, though, since I think that ;cmd should be shelling out to the terminal. I would have thought it would be the same as running cmd in the terminal, and be unrelated to PyCall. I might be wrong, though.

Twice version of python in Ubuntu

I wold like to use Pycham with Python3.4.3 and Pyqt4.
So, I have installed Python 3.4.3 in Ubuntu 16.04 and run PyQt4 as well. After that, I continued installing Pycharm. However, pycharm interpreter didn't recognized these version of python. It only shows python 3.5 and 2.7 version. However, when I run in terminal python3.4>>import PyQt4, there isn't wrong message. I think that all compilation that I have to do was right. Anyone know what can I do to fix this problem?
How can I put Pycharm to recognize python3.4.3 that I installed with PyQt4?

How to set Python IDLE to use certain python version

I am using Windows 8.
Python version 2.7.3 have been installed on my computer together with another software.
Now I have installed python 3.3.5 and i want to use this version from now.
But everytime I run Python IDLE it runs version 2.7.3.
Even if I go to C:\Python33\Lib\idlelib\idle.pyw and run idle.pyw it runs with the 2.7.3 version.
I thought that every python version install its own IDLE so I am quiet confused here.
When I run Hello world program from the console it runs using the version 3.3.5 I have checked that.
So what I need to do is to run IDLE using 3.3.5 version
Anybody knows what to do?
Each installation of Python comes with its own respective version if IDLE. I suggest you explore your Python installation folder, and find the version of IDLE you're looking for and create a shortcut to it, or add it to your environment variable list, so you can invoke a specific version from the command line.

Resources