Reputation: 137
I do the following:
conda create -n myenv -c conda-forge jupyter xarray cmocean numpy matplotlib netCDF4 cartopy pandas
conda activate myenv
jupyter notebook
Is there a way that I can export this environment to another computer to be activated by another user?
I want other users to run my jupyter notebook script without having to install python packages.
Upvotes: 5
Views: 10311
Reputation: 15578
Yes you can:
conda activate ENV
conda env export | grep -v "^prefix: " > environment.yml
The grep command removes your prefix. That yml file can be used by others as
conda env create -f environment.yml
conda activate ENV
Upvotes: 5
Reputation: 1324
You can copy the complete folder of the environment. It can be found easily, where your python is installed.
Upvotes: 1
Reputation: 463
conda activate myenv
conda env export > environment.yml
environment.yml
file to the other person.To create environment from .yml
file: conda env create -f environment.yml
The first line of the yml file sets the new environment's name.
Upvotes: 8