Conda with Cygwin:已创建环境但未找到位置且激活后无法使用

Conda with Cygwin: Environment created but location not found and unusable after activation

On Windows 10 我在 C:/home/miniconda3

下安装了 Miniconda3

我正在使用 Cygwin(bash shell 模拟器)并且在 Cygwin shell(在命令行)中我正在尝试使用 conda 创建一个虚拟环境。

我正在使用 conda 创建一个环境,它看起来创建正常,但是当我激活然后尝试使用该环境时,我收到一个错误,似乎表明创建的环境有问题。到目前为止,这是我尝试过的方法:

从全新的 Miniconda 安装开始(今天下载并安装),并列出环境:

$ conda env list
# conda environments:
#
base                  *  C:\home\miniconda3

创建环境:

$ conda create -n test_env
Solving environment: ...working... done

## Package Plan ##

  environment location: C:\home\miniconda3\envs\test_env


Proceed ([y]/n)?

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use:
# > activate test_env
#
# To deactivate an active environment, use:
# > deactivate
#
# * for power-users using bash, you must source
#

再次显示环境,显示环境已创建:

$ conda env list
# conda environments:
#
base                  *  C:\home\miniconda3
test_env                 C:\home\miniconda3\envs\test_env

激活新环境,使用 source(因为 Cygwin 是 运行 bash)。现在,当我列出环境时,我希望在测试环境的名称旁边看到一个星号,表明它现在是活动环境,但它不见了:

$ source activate test_env
$ conda env list
# conda environments:
#
base                     C:\home\miniconda3
test_env                 C:\home\miniconda3\envs\test_env

此时我可以尝试使用 conda 命令,但它们都会失败,因为找不到环境 and/or 环境本身是 incomplete/malformed/corrupted:

$ conda list

EnvironmentLocationNotFound: Not a conda environment: C:\home\miniconda3\envs\test_env

$ conda install pandas

EnvironmentLocationNotFound: Not a conda environment: C:\home\miniconda3\envs\test_env

$ conda update pandas
PackageNotInstalledError: Package is not installed in prefix.
  prefix: C:\home\miniconda3\envs\test_env
  package name: pandas

当我尝试停用环境时,出现以下错误:

$ source deactivate
': not a valid identifierULT_ENV
': not a valid identifier
': not a valid identifierIX
': not a valid identifierPT_MODIFIER
': not a valid identifierON_EXE

提前感谢您就可能出现的问题提出任何建议and/or我该如何解决这个问题。

运行 Cygwin 下的 conda is not fully supported, and the recommended solution for users who want to run conda and associated conda environments in a Linux like shell on Windows is to use the bash shell that comes included with the git client for Windows