How to set the default python3 to python3.7?

后端 未结 1 1542
心在旅途
心在旅途 2021-01-25 23:41

I have a Python 3.6.8 in /usr/local/bin/Python3 and a Python 3.7.6 in /usr/local/bin/Python3.7 on my Macbook (In addition, there is Mac default Python2, which I don\'t want to c

1条回答
  •  情歌与酒
    2021-01-26 00:36

    You can use the "ln" command to create a symbolic link (symlink) to the existing file as:

    ln -s -f /usr/local/bin/Python3.7 /usr/local/bin/python
    

    In order to be sure you can close your terminal and then open it again to check the changes default version as before.

    python3 --version
    

    0 讨论(0)
提交回复
热议问题