我使用 Miniconda3 创建了一个名为 DL 的虚拟环境。当我在底部栏中将环境切换到 DL 然后运行一个 Python 文件时,新打开的终端首先使用本地安装的 Python 解释器运行代码。在此过程中,会有一个cmd窗口一闪而过。然后,“conda activate DL”命令将自动出现在 Visual Studio Code 的终端中。
集成终端的输出如下:
PS D:\snow\file\postGra> python -u "d:\snow\file\postGra\test.py"
hello
PS D:\snow\file\postGra> D:/snow/sw/miniconda3/Scripts/activate
PS D:\snow\file\postGra> conda activate DL
(DL) PS D:\snow\file\postGra>
但是正常的终端输出应该是这样的:
(DL)PS D:\snow\file\postGra> python -u "d:\snow\file\postGra\test.py"
hello
有没有人遇到过一样的问题的?麻烦告诉我你们是怎么解决的、谢谢