Adding Anaconda to the path or not

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

+5
source share
1 answer

A good way is to work with conda environments.

  • Add the path where conda.exe to PATH temporarily:

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

  • Create a new environment:

    conda create -n py36 python=3.6

  • Activate it:

    activate py36

Now the prompt should change to py36 , and everything should work, since all the necessary paths are set. You need to install all your packages necessary for your project while this environment is activated. When this is done, disable it using deactivate .

+4
source

Source: https://habr.com/ru/post/1269968/


All Articles