What are environments for in Anaconda prompt?

1

What do environments do in Anaconda Prompt? What happens when I create/activate a new environment? And why is it useful?

Emil

Posted 2019-09-04T22:26:52.433

Reputation: 133

Answers

2

What do environments do in Anaconda?

They separate multiple versions of Python and their related packages.

What happens when I create/activate a new environment?

When you create a new environment, a copy of a particular Python interpreter is associated with that environment. I believe Anaconda also typically has set of default packages for new environments as well.

When you activate an environment, you gain the ability to use the particular Python interpreter associated with that environment independent of any other version(s) of Python you may have installed. You also gain access to all the packages in that environment. You can then use those packages in your code or manage those packages in an isolated manner (installing, upgrading or removing them).

Why is this useful?

  • Different Python projects may have different interpreter and/or package requirements.

  • You may not wish to pollute your other Python installations.


Regarding pollution, this is particularly true on "nix" based systems, where messing around with your global Python installation can have serious repercussions on your ability to use the OS.


Anaksunaman

Posted 2019-09-04T22:26:52.433

Reputation: 9 278