无法从environment.yml创建conda env

时间:2019-02-28 13:18:15

标签: python conda

The documentation似乎很明确,我应该这样做:

conda env create -f environment.yml
#
# To activate this environment, use
#
#     $ conda activate d2v
#
# To deactivate an active environment, use
#
#     $ conda deactivate

但是随后conda activate d2v说“找不到conda环境:d2v”,并且环境列表中确实没有d2v的迹象。这在多个系统中都是一个反复出现的问题,实际上,我从未设法从environment.yml创建一个环境。我该如何开始调试呢?

至少手动方法conda create --name d2v仍然有效。

这是我的conda信息:

(base) me@mymachine:/data/me/repos/design2vec$ conda info

     active environment : base
    active env location : /data/me/software/miniconda3
            shell level : 1
       user config file : /home/me/.condarc
 populated config files :
          conda version : 4.6.7
    conda-build version : not installed
         python version : 3.7.1.final.0
       base environment : /data/me/software/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /data/me/software/miniconda3/pkgs
                          /home/me/.conda/pkgs
       envs directories : /data/me/software/miniconda3/envs
                          /home/me/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.7 requests/2.21.0 CPython/3.7.1 Linux/4.15.0-34-generic ubuntu/18.04.1 glibc/2.27
                UID:GID : 1003:1003
             netrc file : None
           offline mode : False

1 个答案:

答案 0 :(得分:0)

尝试此>

  • sudo ln -s /home//miniconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh
  • export PATH =“ / home // miniconda3 / bin:$ PATH”