Activating conda environment with its full path

后端 未结 4 584
忘掉有多难
忘掉有多难 2021-01-04 04:11

Usually, we activate a conda environment with the command:

source activate env_name

Is it possible to activate conda environment with its f

4条回答
  •  滥情空心
    2021-01-04 04:58

    Update for conda 4.4 and up:

    You need to specify the conda environment path to activate. The new conda activate command should not need the full path to an "activate script" any longer, since the command is now "built-in" to conda. So something like:

    conda activate (fullpath)/env-name-here
    

    should work.


    The command you have specified activates the root environment because you have not given conda an environment to activate, and root is the default. If you want to activate a particular environment, you can certainly do so with the full path to the activate script, for instance

    source (full path to main Anaconda directory)/bin/activate (fullpath)/env-name-here
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^
                                                               You're missing this part
    

提交回复
热议问题