无法在 vs 代码中使用 python 基础环境
Can't use python base environment in vs code
基础环境在我的vs代码中没有显示,而在vs代码中,它有一个名为"Miniconda3"的环境。当我尝试在 vs 代码中 运行 .ipynb 文件时,出现此错误:
Error: Activating Python 3.7.3 64-bit ('Miniconda3': conda) to run Jupyter failed with Error: Command failed: d:/Miniconda3/Scripts/activate && conda activate Miniconda3 && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:/Users/****/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/printEnvVariables.py
Could not find conda environment: Miniconda3
You can list all discoverable environments with conda info --envs
.
如何在不创建新环境的情况下解决这个问题?
您需要创建一个指定 Python 版本的环境,以便 conda 安装 Python 解释器,例如conda create -n <yourenvname> python=3.8
.
可以在 environments docs.
中找到有关扩展在何处查找环境的详细信息
基础环境在我的vs代码中没有显示,而在vs代码中,它有一个名为"Miniconda3"的环境。当我尝试在 vs 代码中 运行 .ipynb 文件时,出现此错误:
Error: Activating Python 3.7.3 64-bit ('Miniconda3': conda) to run Jupyter failed with Error: Command failed: d:/Miniconda3/Scripts/activate && conda activate Miniconda3 && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python c:/Users/****/.vscode/extensions/ms-python.python-2019.11.50794/pythonFiles/printEnvVariables.py Could not find conda environment: Miniconda3 You can list all discoverable environments with
conda info --envs
.
如何在不创建新环境的情况下解决这个问题?
您需要创建一个指定 Python 版本的环境,以便 conda 安装 Python 解释器,例如conda create -n <yourenvname> python=3.8
.
可以在 environments docs.
中找到有关扩展在何处查找环境的详细信息