How-To: Using Anaconda: Export a Conda Environment to Share Across OS Platforms

Summary

Export a Conda Environment to Share Across OS Platforms

Body

Question

How do I export a virtual conda environment to share across OS platforms from the Command Line?

How do I move my Anaconda Environment to another OS?

 

Answer

Note:  To activate an environment from the command line, see "How-To: Using Anaconda - Activate a Virtual Conda Environment via Command Line Interface"

1. To share a virtual conda environment across OS platforms, export an environment.yml file using the --from-history option. In conda prompt or terminal with the desired active environment, enter "conda env export --from-history > environment.yml". 

Anaconda Prompt with "conda env export --from-history > environment.yml"

 

2. Contents of the example environment.yml file: 

Anaconda prompt displaying contents of environment.yml

 

Details

Details

Article ID: 2622
Created
Wed 7/8/26 9:39 AM
Modified
Tue 7/28/26 11:32 AM

Related Articles

Related Articles (1)

Index of Advanced Topics for Conda, Python, and R