Oct/30/2018 Updated by

Anaconda

Switchable Python Environment with Conda


[Up] Japanese English

In order to run python with the specified version of python itself and versions of various packages, it is necessary to switch the environment of python. "conda" manages switching python environments in Anaconda.


To use Conda

For Windows: "Conda Prompt"

No special setting is required. Select "Start" → ""Anaconda3 (64-bit)" → "Anaconda Prompt" at the "start menu" to start it. A new window is displayed, and at the prompt you will see the name of the python environment. The environment name is "base" in the following example.




For Windows: "Command Prompt"

No speical setting is required. Select "Start" → ""Windows System Tools" → "Command Prompt" at the "start menu" to start it. When you activate without specifying the python environment, the base environment is activated.

The name of the activated python environment is displayed at the beginning of the prompt.

  C:\Users\nitta> conda activate 
  (base) C:\Users\nitta> conda activate 
  (base) C:\Users\nitta> conda activate gpu 
  (gpu) C:\Users\nitta> 



For Windows: cygwin

When Anaconda is installed in "C:/sys/Anaconda3" on the Windows OS, it appears as "/cygdrive/c/sys/Anaconda3" in the cygwin shell. Hereinafter, the path is expressed as $(ANACONDA).