6

I have Anaconda installed in my machine with two environments one is base(default) and other is vision.

Whenever I open Anaconda Prompt, it opens in the base environment and I have to change the environment manually using

$ activate vision

So I'm looking for a way to open Anaconda Prompt in my vision environment by default.

Is it possible to do so?

  • OS: Windows10
  • Anaconda: 4.5.11

P.S: I have already gone through the similar question asked here. Accepted answer doesn't provide a solution here as my both python versions are 3.6.

Sociopath
  • 13,068
  • 19
  • 47
  • 75

2 Answers2

3

Instead of messing with the path and stuff in my .bashrc file, I simply appended the line:

conda activate sdesign

My environment name is sdesign. So it simply activates the environment every time I open a new terminal. Hope that helps.

Dustin K
  • 150
  • 2
  • 11
  • Where to add line `conda activate sdesign` ? – Sociopath Mar 21 '19 at 03:57
  • I added the line in ".bashrc". So your terminal just runs that command every time you open a terminal. Make sure to replace 'sdesign' with the environment you want to be "default". – Dustin K Mar 22 '19 at 16:00
  • This is a question for Windows 10, and I suppose `.bashrc` is usually used in Linux or Mac. – Niko Föhr Nov 10 '20 at 10:17
0

If you want to start anaconda-navigator with a particular environment [e.g MyEnv ] then For Linux OS I know a method. Maybe, it will be beneficial for someone. So, I'm sharing it.

  1. First, completely close anaconda-navigator and the edit the file

  2. Open ~/.anaconda/navigator/anaconda-navigator.ini.

change

default_env = '/home/user/anaconda3'

to

default_env = '/home/user/anaconda3/envs/MyEnv'

Note: Here /home/{user will be different for everyone}/anaconda ... like that.

You can also edit another options like

dataspell_path = 
pycharm_ce_path = 
pycharm_pro_path = 
vscode_path = /usr/share/code

and so on.

For windows there will be a file maybe in C:/User/AppData/local/anacond/anaconda-navigator.ini like that. Edit that like the solution. Surely that will also work.