Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create empty conda environment

I can create a new conda environment, with program biopython with this:

conda create --name snowflakes biopython 

What if I do not want to install any program? It seems I can not do that:

» conda create --name tryout Error: too few arguments, must supply command line package specs or --file  You can specify one or more default packages to install when creating an environment.  Doing so allows you to call conda create without explicitly providing any package names.  To set the provided packages, call conda config like this:      conda config --add create_default_packages PACKAGE_NAME 
like image 941
blueFast Avatar asked Mar 08 '16 06:03

blueFast


People also ask

How do you create a blank conda environment?

To create an environment that is absolutely empty, without python and/or any other default package, just make a new folder in envs directory in your Anaconda installation (Anaconda3 in this example):.

How do you create a conda environment with requirements txt?

txt. Step 1: On Windows open up a Anaconda Prompt, on Linux and MacOS open up a Terminal and go to that directory which has the environment. yml file. Step 2: Create the environment by running conda env create -f environment.


2 Answers

You can give a package name of just "python" to get a base, empty install.

conda create --name myenv python conda create --name myenv python=3.4 
like image 83
joelion Avatar answered Oct 02 '22 09:10

joelion


If you've created a create_default_packages block in your .condarc file, @joelion's answer will install those packages. If you don't want those, use the --no-default-packages flag. For example:

conda create --name myenv python --no-default-packages 
like image 20
farenorth Avatar answered Oct 02 '22 09:10

farenorth