Dealing with Multiple Python Versions— do not run independently

后端 未结 5 1310
无人共我
无人共我 2021-01-14 03:09

I have Python 2.7 (my preferred version) and 3.3 (version used in my Programming class) installed on my computer (OS: Windows 7). Until a certain point, they worked fine ind

5条回答
  •  迷失自我
    2021-01-14 04:03

    You could use shebang lines:

    #! /usr/bin/env python2
    

    for Python 2.x scripts and:

    #! /usr/bin/env python3
    

    for Python 3.x scripts. You can use more specific versions e.g., python3.3

    You can configure default Python version.

提交回复
热议问题