简体   繁体   中英

Adding Anaconda to Path or not

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? (eg my sphinx make.bat ).

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM