Python version doesn't seem to be updating

时间:2019-04-16 22:55:11

标签: python-3.x python-2.7

Here is what I get when I run the following commands in my terminal:

python --version
python 2.7.1
python3 --version
python 3.7.3

I ran the 'Update Shell Profile.command' file that comes with the Python3 download, but it still doesn't change the value of

python version

when I run it. My question is, is this normal? Does it change anything important other than needing to type 'python3 file.py' to run 'file.py'? If so, how do I change this? (Also, the computer I am using uses Homebrew which I am not familiar with, I am not sure if this changes anything or how.)

1 个答案:

答案 0 :(得分:0)

Python 2.7 and Python 3.7 are the latest releases of python 2 and 3 repsectively. Those two are two different version which can co-exist together. You can have both versions installed in your computer at the same time. If u dont like that just uninstall one(I'd suggest python2). The main difference is that python 3 offers many advantages compared to python 2. Some of them would be that some libraries work only for that version other legacy ones work for the other version etc. So there is no problem with having both but like i said there is really no point. Just choose whch version u like and uninstall the other one.