How to get `python` to run Python 3 in WSL bash?

后端 未结 1 1573
礼貌的吻别
礼貌的吻别 2021-02-14 10:13

When I type python into my bash shell (Windows Subsystem for Linux) in Windows 10 Home, I get the following error message:

The program \'python\' ca         


        
相关标签:
1条回答
  • 2021-02-14 10:54

    python in linux world as a CLI command almost always means python2 and not python3. Make sure that you have python2 installed (sudo apt install python).

    DO NOT alias python to python3 - this is some bad advice!

    To run python3, you have to specify python3 on the CLI.

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