Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Anaconda to Path or not

Tags:

The official recommendation is not to add Anaconda / Python to the Windows PATH environment variable (see Anaconda User Guide FAQ). But how can I ensure then that my custom build scripts find python? (e.g. my sphinx make.bat).

like image 285
Xaser Avatar asked Jul 19 '17 08:07

Xaser


People also ask

Is it good to add Anaconda to path?

Bottom line: Adding Anaconda to the PATH might help in simple cases, but the whole concept of Anaconda's dependency management depends on environments and their activation. It's better to use Anacona the proper way right from the beginning and NOT to add Anaconda to the PATH.

Where should I put Anaconda?

The default install location for Anaconda is: (Linux): /home/<your_username>/Anaconda3. (Windows): C:\Users\<your_username>\Anaconda3. (Mac): /Users/<your_username>/Anaconda3.

What is the Anaconda Python path?

As a default, the python.exe file in anaconda is in: c:\.....\anaconda.

Do I need to install Anaconda if I have Python?

If You Already Have Python InstalledLeaving it unchecked means that you will have to use Anaconda Command Prompt in order to use Anaconda. So, unless you add the PATH later, you will not be able to use Python from your command prompt.


1 Answers

UPDATE

Current Anaconda installations offer an "Anaconda Prompt" that has conda on the path. Go to the Windows start button (Window icon) and start typing anaconda. You should see an entry "Anaconda Prompt". Click on it. A new window opens that has conda in the search path. Use as many Anaconda prompts as needed.

Old Answer

A good way is to work with conda environments.

  1. Add the path where the conda.exe to the PATH temporally:

    set PATH=C:\my\path\to\conda;%PATH%

  2. Create a new environment:

    conda create -n py36 python=3.6

  3. Activate it:

    activate py36

Now the prompt should change to py36 and all should work since all needed paths are set. You need to install all your packages you need for your project while this environment is activated. When done deactivate it with deactivate.

like image 192
Mike Müller Avatar answered Oct 13 '22 01:10

Mike Müller