Yorian
Yorian

Reputation: 2062

Conda set default environment

I've just started with using conda (miniconda) for managing different python environments. By default there is a "base" environment. To seperate development from specific projects I've created a new environment called "development" in which I've installed a list of packages.

Whenever I start up my laptop (windows) it uses the "base" environment by default and I have to manually activate the development environment. Is there a way to set the default environment different than the "base" environment, such that I don't have to start with "activate development" whenever I start up my laptop?

I already tried by adding the path to the environment to the user PATH variable under windows before other paths. This however hasn't helped.

Upvotes: 3

Views: 7471

Answers (2)

Nick Carraway
Nick Carraway

Reputation: 77

Instead of the default Anaconda Prompt, You can launch another Anaconda Prompt which activates corresponding env for you. For example, the 'myEnv' Anaconda Prompt, which is installed automatically when you create a new env called 'myEnv'. enter image description here

Upvotes: 1

YuhaoQI
YuhaoQI

Reputation: 69

If you start from anaconda prompt, you can change the property of the shortcut.
Change the end of it's target from:

C:\Users\yourusername\AppData\Local\Continuum\anaconda3\

to:

C:\Users\yourusername\AppData\Local\Continuum\anaconda3\env\yourenv

Upvotes: 2

Related Questions