首页 > 解决方案 > 在 conda 环境中找不到命令“python”

问题描述

我在 MS Windows 10 上使用 Ubuntu 20.04 WSL。我从主页(https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh)安装了 anaconda 并尝试创建一个新环境,如下所示图片。

在此处输入图像描述

如您所见,我只是创建了一个新环境并切换到该环境,但没有找到 Python 命令。

我做echo $PATH了并且得到了

/home/my_username/anaconda3/envs/test/bin:/home/my_username/anaconda3/condabin:

已经在 PATH 的开头。

我该如何解决这个问题?谢谢

标签: anacondawindows-subsystem-for-linux

解决方案


我发现了问题

创建新环境时,我们需要指定Python的版本

conda create -n test python=3.8


推荐阅读