How do I make Python 3.5 my default version on MacOS?

后端 未结 7 2297
迷失自我
迷失自我 2020-12-28 10:46

I have just installed Python 3.5.1 on my Mac (running the latest version of OSX). My system came with Python 2.7 installed. When I type IDLE at the Terminal pro

7条回答
  •  醉话见心
    2020-12-28 11:11

    Since Python 2 and 3 can happily coexist on the same system, you can easily switch between them by specifying in your commands when you want to use Python 3.

    So for Idle, you need to type idle3 in the terminal in order to use it with Python 3 and idle for using it with Python 2.

    Similarly, if you need to run a script or reach a python prompt from the terminal you should type python3 when you want to use Python 3 and python when you want to use Python 2.

提交回复
热议问题