Powershell Python: Change version used

后端 未结 2 760
臣服心动
臣服心动 2020-12-07 03:06

I\'m using windows xp.

I\'m trying to use Python in powershell. On my computer I have both Python 3.3 and 2.7 installed. I\'m trying to run 2.7 but whenever I type \

相关标签:
2条回答
  • 2020-12-07 03:26

    Something like Python Select? Windows support is experimental but it might be worth a try.

    https://github.com/Activestate/pythonselect

    There's also switchpy, although that only supports up to Python 3.2.

    apipes.blogspot.com/2010/10/switchpy.html?m=1

    0 讨论(0)
  • 2020-12-07 03:32

    In powershell, enter the following:

    $Env:PY_PYTHON = 2
    

    Then try using the command "py". It should start up Python 2.7. If you ever want to run Python 3.3 again, "py -3" will do the trick.

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