Windows10 PowerShell Python 调试

本文介绍了在Windows10的PowerShell环境中遇到Python3.5.2的错误,通过设置环境变量切换到Python2.7.12进行调试。在Python3中,print变为函数,需要使用括号。卸载Python3并安装Python2后,成功运行含有旧版print语法的代码。
摘要由CSDN通过智能技术生成
Windows10 PowerShell下的Python:


Notepad++6.9.2/Windows powershell/Python3.5.2(Print参数发生变化,后更改为Python2.7.12
------------------Error Logs------------------------------------------------------------------------------
PS C:\WINDOWS\system32> python
python : 无法将“python”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ python
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (python:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
------------------------------------------------------------------------------------------------------------


PS C:\Users\TANYI>[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Program Files\Python35", "User")


Reboot PowerShell OR Restart Windows
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值