How do I create a conda environment with the specified libraires?

When creating a new conda environment, some packages are installed by default.

> conda create -n newEnv python=3.6

The following NEW packages will be INSTALLED:

     openssl:    1.0.2k-1
     pip:        9.0.1-py36_1
     python:     3.6.1-0 
     ...
     zlib:       1.2.8-3

      

I believe there is a way to specify the default libraries to install when creating a new environment without typing all the names after the create conda command.

Is there a file I can edit to specify which libraries are installed by default when creating a new environment with conda?

Solution: Based on holdenweb's answer below, you need to add the following line to .condarc (doesn't exist by default):

create_default_packages:
     - jupyter
     - matplotlib
     - otherLibrary
     ...

      

This is a list of libraries that will be installed when creating a new environment. You can also add libraries directly using the following command (using jupyter as an example)

conda config --add create_default_packages jupyter

      

which will add the said library (here jupyter) to the list above.

+3


source to share


1 answer


Are you looking for an option create_default_packages

? You can specify a default package list using this directive in your file .condarc

. He documented on this page . You can override it with a command line option --no-default-packages

.



+3


source







All Articles