How to set default Python version in terminal on OS X 10.6.8?

前端 未结 4 1213
心在旅途
心在旅途 2020-12-13 15:11

I just downloaded python 2.7 on my mac which runs OS X 10.6.8. The previous version of python installed was 2.6.

When I type python in the terminal it o

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 15:44

    Add followings to your ~/.bash_profile

    # Setting PATH for Python 2.7
    PATH="/path/to/your/python2.7/bin:${PATH}"
    export PATH
    

    Save the file and reopen the terminal.

提交回复
热议问题