In terms of computer software, an operating environment or integrated applications environment is the environment in which users can execute software. Usually, such an environment consists of a user interface and an API. To a certain degree, the term platform could be viewed as its synonym. There are many reasons why we want to share our environment with someone else. For example, they can re-create a test that we have done. To allow them to quickly reproduce our environment with all of its packages and versions, give them a copy of your environment.yml file. Depending on the operating system, we have the following methods to export our environment file. Note that if we already have an environment.yml file in our current directory, it will be overwritten during this task.
There are different ways to activate the myenv environment file depending on the systems used. For Windows users, in our Anaconda prompt, type the following command:
activate myenv
On macOS and Linux, in our Terminal window, issue the following command:
source activate myenv
Note that we replace myenv with the name of the environment. To export our active environment to a new file, type the following:
conda env export > environment.yml
To share, we can simply email or copy the exported environment.yml file to the other person. On the other hand, in order to remove an environment, run the following code in our Terminal window or at an Anaconda prompt:
conda remove --name myenv --all
Alternatively, we can specify the name, as shown here:
conda env remove --name myenv
To verify that the environment was removed, run the following command line:
conda info --envs