正确设置路径变量后,从Power Shell运行的Python仍然无法启动,并显示为冻结状态 [英] Python running from power-shell after correctly setting path variable, still fails to start and appears frozen

查看:119
本文介绍了正确设置路径变量后,从Power Shell运行的Python仍然无法启动,并显示为冻结状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从本指南(Zed Shaw的《艰苦学习Python》指南)开始.来这里阅读有关路径变量的类似问题,通过重新安装应用程序并手动选择安装路径变量作为附加选项来解决. (它是红色的,标记为排除).我也相信将其设置在Power-shell中也是可行的,但是直到我这样做才不确定.

I started here from this guide, Zed Shaw's guide for Learning Python the Hard Way. Came here reading a similar issue regarding the path variable, solved it by reinstalling the application and manually selecting to install path variable as an added option. (it was red, marked for exclusion) I also believe that setting it in power-shell worked too but was unsure until I did this.

我的问题是当我现在运行python时,它就坐在那儿.似乎冻结,cmd提示没有响应,我已经点击了红色方框以将其停止. 停止操作,控制+中断"

My issue is when I now run python, it just sits there. Appears frozen, cmd prompt is not responsive and I have go hit the red square box to stop it. "stop operation, control + break"

这是它给出的消息,

python:Python 2.7.13(v2.7.13:a06454b1afa1,2016年12月17日,20:53:40)[MSC v.1500 64 位(AMD64)]在win32上 在第1行:char:1 +蟒蛇 + ~~~~~~ + CategoryInfo:未指定:(在Win32:String上为Python 2.7.13(... MD64)]) [],RemoteException + FullyQualifiedErrorId:NativeCommandError

python : Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 At line:1 char:1 + python + ~~~~~~ + CategoryInfo : NotSpecified: (Python 2.7.13 (...MD64)] on win32:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError

输入帮助",版权",信用"或许可证"以获取更多信息.

Type "help", "copyright", "credits" or "license" for more information.

(>>>)-坐在这里.

(>>>) -sits here.

-此时,直到我按下红色正方形框将其停止之前,什么也不能做,还要注意的是在键入python enter之后的一小会儿,它打开了一个立即关闭的辅助窗口.我也已经以powershell身份作为管理员运行,仍然没有任何变化.

-- And nothing can be done at this point until I hit red square box to stop it, also of note for a brief moment after typing python enter, it opens a secondary window which immediately closes. I have also ran powershell as admin, still no change.

更新,我在桌面上遇到了完全相同的问题.并且,如果我在ms cmd提示符下尝试此操作,则python ..没问题.加载正常,并带有闪烁的提示.

Update, I have this exact same issue on the desktop. And If I try this in ms cmd prompt, python.. no issue. Loads up fine With a blinking prompt that is ready.

推荐答案

您必须使用PowerShell ISE,这是一个已知问题!例如. 在Powershell ISE中Python解释器崩溃

You must be using PowerShell ISE, where this is a known issue! E.g. Python Interpreter crashing in Powershell ISE

但是,您可以使用常规的PowerShell控制台并在该控制台中启动Python.

You can, however, use regular PowerShell console and launch Python within that console.

这篇关于正确设置路径变量后,从Power Shell运行的Python仍然无法启动,并显示为冻结状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆