Python running from power-shell after correctly setting path variable, still fails to start and appears frozen

笑着哭i 提交于 2019-12-24 08:47:39

问题


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.

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"

This is the message it gives,

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.

-- 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.

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.


回答1:


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

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



来源:https://stackoverflow.com/questions/43701544/python-running-from-power-shell-after-correctly-setting-path-variable-still-fai

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!