Skip to content
Advertisement

How to create a conda environment with specified libraires?

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

JavaScript

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

Is there any file I can edit so as to specify which are the default libraries to install when creating a new environment with conda?

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

JavaScript

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

JavaScript

which will append the specified library (here jupyter) to the list above.

Advertisement

Answer

Perhaps you are looking for the create_default_packages option? You can specify a list of default packages using this directive in your .condarc file. It’s documented on this page. You can override it with the --no-default-packages command-line option.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement