What version of Python is on my Mac?

前端 未结 6 809
臣服心动
臣服心动 2020-12-07 13:32

I have a mac, when I do:

python --version 

I got:

Python 2.7.6

but when I got to:

/System         


        
6条回答
  •  一个人的身影
    2020-12-07 13:57

    If you have both Python2 and Python3 installed on your Mac, you can use

    python --version
    

    to check the version of Python2, and

    python3 --version
    

    to check the version of Python3.

    However, if only Python3 is installed, then your system might use python instead of python3 for Python3. In this case, you can just use

    python --version
    

    to check the version of Python3.

提交回复
热议问题