Set python version on MacOS Big Sur

macmacospythonversions

does someone had situation when "python –version" says "Python 2.7.16", but installed version is 3.7

Command "pyenv versions" says "* 3.7.11 (set by /Users/dima/.python-version)"

My applications see also just version "2.7.16".

Does someone know how to set default Python version to installed "3.7.11"? Simply set entire system default python to 3.7.

Thanks a lot!

Best Answer

Python is python 2, for legacy applications. To use python 3, you must use the command python3. So python3 —-version should be what you are looking for.

Edit: I missed that you're using pyenv. Maybe it's a bug with pyenv, but python3 should still bring python 3.