- Create the new environment with the following command:
conda create --name python27 python=2.7
conda will display information about the changes and ask for confirmation. Go ahead and enter yes to accept the environment creation.
- To activate the environment on Linux and macOS, use the following command:
source activate python27
- On Windows, the command to activate an environment is as follows:
activate python27
- Let's now test the new environment. Start Python in the usual way after activating the environment. Notice that in the startup message, it should state that version 2.7 of Python is being run. Now run the following statement in the Python prompt:
zip([['a','b'],[1,2]])
- This will produce the following output: ...