5

I can't figure out how to setup my Windows 7 machine so that it "always" finds my Python 3.6 Anaconda environment, which is not my root env. I don't want to have to do "activate ..." in a cmd window every time I want to use that env. And besides, there's a Spyder item in the start menu, for 3.6 (separate from default env), which won't work. I assume because of an env issue.

A robust solution greatly appreciated.

Dave

D Strozzi
  • 150
  • 1
  • 11
  • Try the suggestion for windows in [this answer](http://stackoverflow.com/a/40777297/5014455) – juanpa.arrivillaga Mar 28 '17 at 22:40
  • 1
    Thanks, but this isn't what I'm after. I want the Python environment that "plain" Windows sees to be my Pyhon 3.6 env. Why? Because I run Spyder, which is a Windows app, from the start menu. No cmd in the loop. And whatever happened to autoexec.bat and config.sys? Surely I'm not so old that no one else remembers this... – D Strozzi Mar 29 '17 at 04:49
  • To run the Spyder item, which I assume is a shortcut to ``spyder`` in command line, it must be in the corresponding environment. To fix this issue, check if the Spyder item points to a .bat file or some shell file. If it is, then perhaps all you have to do is updating the file to activate the right environment before calling ``spyder``. – Thomas Fauskanger Mar 30 '17 at 01:37

1 Answers1

1

I had a similar issue where every time I opened anaconda prompt it started with 'base' as the default environment. But the issue was that I was mostly working in a different custom environment so I had to activate it each time I wanted to use it. Here is the solution I found for autoactivating my preferred environment on a Windows 10 system:

  • Open anaconda prompt & use 'conda env list' to find the location of the environment you wish to use. enter image description here

  • Go to the start menu, right-click 'Anaconda Prompt' and go to file location. enter image description here

  • Create a copy of its shortcut

  • Open its properties & change the target to the location of your preferred environment.

    enter image description here

Now every time you open anaconda prompt through this shortcut it will automatically load your chosen environment.

BOT_bkcd
  • 321
  • 3
  • 12