【发布时间】:2022-01-01 02:06:50
【问题描述】:
当我在 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.
【问题讨论】:
-
你可以试试
python3 -
ISE 不支持交互式控制台应用程序。尝试在其中输入
powershell.exe,您应该会收到一条错误消息,表明它不受支持;其他交互式控制台应用程序也存在同样的问题,只是它不是$psUnsupportedConsoleApplications(您可以在 ISE 控制台中键入)列表的一部分。建议使用 VSC 以备将来使用。