python 未在 powershell ISE 中运行

0 powershell powershell-ise

当我在 Windows powershell 或命令模块 (Windows 10) 中输入“python”时,我会进入 python 环境。但是,当我在 Windows Powershell ISE 中尝试相同的操作时,我收到如下错误消息。关于做什么的任何指导?

python : Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
At line:1 char:1
+ python
+ ~~~~~~
    + CategoryInfo          : NotSpecified: (Python 3.9.0 (t...MD64)] on win32:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Type "help", "copyright", "credits" or "license" for more information.
Run Code Online (Sandbox Code Playgroud)

csg*_*eek 5

您无法从 Powershell ISE 以交互方式运行 python。不仅是Python,你将无法运行任何交互式控制台应用程序。

为了使用 python,您需要使用start python,它会在新窗口中打开 python 命令行。