How can I make the “python” command in terminal, run python3 instead of python2?

后端 未结 6 1768
天涯浪人
天涯浪人 2020-12-31 03:53

I\'m just starting to learn Python and did search around a little, so forgive me if this has been asked and answered.

When running scripts through the command line/t

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-31 04:34

    If you are using Linux, add the following into into ~/.bashrc alias python=python3 Restart the shell and type python and python3 should start instead of python2.

提交回复
热议问题