Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is possible to improve the activation time of a conda environment?

First, please apologize if any mistake and the inconvenience. I'm new with conda and anaconda.

I'm struggling with the time that takes the activation of my conda environment (up to 10 seconds) - the 'activate' is slow.

Is the any way to make this timeless? Some people recommend using the root instead of the environment. I would like to keep using environments for the different needs of each project.

I'm using Windows 10 (Home - version 1607), 15.9GB usable RAM, 64-bits OS and x64 processor with Intel i7 2.00GHz CPU.

Current conda install:

           platform : win-64
      conda version : 4.3.21
   conda is private : False
  conda-env version : 4.3.21
conda-build version : 2.1.8
     python version : 3.5.2.final.0
   requests version : 2.12.4
   root environment : C:\Users\Antonio\Anaconda3  (writable)
default environment : C:\Users\Antonio\Anaconda3
   envs directories : C:\Users\Antonio\Anaconda3\envs
                      C:\Users\Antonio\AppData\Local\conda\conda\envs
                      C:\Users\Antonio\.conda\envs
      package cache : C:\Users\Antonio\Anaconda3\pkgs
                      C:\Users\Antonio\AppData\Local\conda\conda\pkgs
       channel URLs : https://conda.anaconda.org/conda-forge/win-64
                      https://conda.anaconda.org/conda-forge/noarch
                      https://conda.anaconda.org/intel/win-64
                      https://conda.anaconda.org/intel/noarch
                      https://repo.continuum.io/pkgs/free/win-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/win-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/win-64
                      https://repo.continuum.io/pkgs/pro/noarch
                      https://repo.continuum.io/pkgs/msys2/win-64
                      https://repo.continuum.io/pkgs/msys2/noarch
        config file : C:\Users\Antonio\.condarc
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.21 requests/2.12.4 CPython/3.5.2 Windows/10 Windows/10.0.14393
      administrator : False
like image 355
Antonio Avatar asked Jun 16 '17 07:06

Antonio


People also ask

How can I make my conda faster?

One option for speeding up conda is to reduce the index. The index is reduced by conda based upon the user's input specs. It's likely that your repodata contains package data that is not used in the solving stage. Filtering out these unnecessary packages before solving can save time.

Do you have to activate conda environment every time?

No, you do not have to activate conda every time you open CMD. This is simply a matter of choice for the developer.

How can conda environment be activated?

To activate your Conda environment, type source activate <yourenvironmentname> . Note that conda activate will not work on Discovery with this version. To install a specific package, type conda install -n <yourenvironmentname> [package] . To deactivate the current, active Conda environment, type conda deactivate .

What is the difference between conda activate and source activate?

Generally, you won't find too much of a difference between conda activate and the old source activate , except that it's meant to be faster, and work the same across different operating systems (the latter difference makes conda activate a huge improvement IMO).


1 Answers

I suspect that conda just does packages freshness check when it starts, over the internet.

In your condarc, try to set

auto_update_conda: False

If that does not help, also try

offline: True

(See the docs.)

like image 150
9000 Avatar answered Sep 27 '22 20:09

9000