Overview
Theconda create command creates a new conda environment with the specified packages. This is the primary way to create isolated Python environments for different projects.
Syntax
To use the newly-created environment, use
conda activate envname. This command requires either the -n NAME or -p PREFIX option unless --dry-run or --download-only is specified.Target Environment Specification
Name of environment.
Full path to environment location (i.e. prefix).
Core Options
Create a new environment as a copy of an existing local environment.
Read package versions from the given file. Repeated file specifications can be passed (e.g.
--file=file1 --file=file2).Use
sys.executable -m conda in wrapper scripts instead of CONDA_EXE. This is mainly for use during tests where we test new conda sources against old Python versions.Channel Customization
Additional channel to search for packages. These are URLs searched in the order they are given (including local directories using the ‘file://’ syntax or simply a path like ‘/home/conda/mychan’ or ’../mychan’).
Use locally built packages. Identical to ‘-c local’.
Do not search default or .condarc channels. Requires
--channel.Specify file name of repodata on the remote server where your channels are configured or within local backups.
Solver Mode Modifiers
Packages in lower priority channels are not considered if a package with the same name appears in a higher priority channel.
Package version takes precedence over channel priority. Overrides the value given by
conda config --show channel_priority.Do not install, update, remove, or change dependencies. This WILL lead to broken environments and inconsistent behavior. Use at your own risk.
Only install dependencies.
Ignore pinned file.
Solver Backend
Choose which solver backend to use.
Platform Options
Target platform/subdir for the environment (e.g., linux-64, osx-64, win-64).
Output and Prompt Options
Report all output as json. Suitable for using conda programmatically.
Only display what would have been done.
Sets any confirmation values to ‘yes’ automatically. Users will not be asked to confirm any adding, deleting, backups, etc.
Can be used multiple times. Once for INFO, twice for DEBUG, three times for TRACE.
Do not display progress bar.
Solve an environment and ensure package caches are populated, but exit prior to unlinking and linking packages into the prefix.
Networking Options
Use cache of channel index files, even if it has expired.
Allow conda to perform “insecure” SSL connections and transfers. Equivalent to setting ‘ssl_verify’ to ‘false’.
Offline mode. Don’t connect to the Internet.
Examples
Create an environment with a specific package
myenv with the sqlite package installed.
Create an environment with multiple packages
Create an environment from a file
requirements.txt.
Clone an existing environment
env2 as a copy of an existing environment env1.
Create an environment at a specific location
Create with specific channel
Common Use Cases
Creating isolated project environments
Creating isolated project environments
Use Each project has its own Python version and dependencies.
conda create to isolate dependencies for different projects:Testing with different Python versions
Testing with different Python versions
Create environments with different Python versions for testing:
Reproducible environments from YAML files
Reproducible environments from YAML files
Use environment.yml files for reproducibility:
Cloning environments for backups
Cloning environments for backups
Clone an environment before making major changes:
Related Commands
conda activate- Activate an environmentconda env create- Create environment from environment.yml fileconda install- Install packages into existing environmentconda remove- Remove an environment