How to make python3 command run Python 3.6 instead of 3.5?

前端 未结 4 475
南笙
南笙 2021-01-30 17:19

I just downloaded Python 3.6.1, but when I type python3 -V in the terminal it\'s still Python 3.5.3. How can I make python3 point to

4条回答
  •  名媛妹妹
    2021-01-30 17:35

    You could update the default python version system-wide using update-alternatives command.

    $ sudo update-alternatives  --set python3 /usr/bin/python3.6
    

    or you can also run the following command to choose among the various python versions installed on a host.

    $ sudo update-alternatives --config python
    

提交回复
热议问题