powershell怎么打不开python?

PS C:\Users\apple> python
python : Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32

所在位置 行:1 字符: 1
+ python
+ ~~~~~~
+ CategoryInfo : NotSpecified: (Python 3.6.5 (v...ntel)] on win32:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

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

想用powershell打开python,结果是这样,怎么办?

你是用得ps ise吧,在那里面是有问题

When people say it "runs in the background" they mean that when you try to run Python in ISE, it opens a legacy console app which ISE illogically hides (even though it can't bridge your actions to that app).
If you run a script which runs and terminates, that's fine, you can do that. You can, for instance, run python --version ...
But you can only start it interactively if you run it as a separate window using the start-process command: start python
Frankly, you'll have a lot better success interacting with PowerShell using the native console version of PowerShell.exe instead of ISE -- there, you can run python interactively and get the output into PowerShell without redirecting it through files.

直接在ps里就没问题了

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答