anaconda - path environment variable in windows

前端 未结 11 1034
迷失自我
迷失自我 2020-12-08 02:23

I am trying to run python from the windows command prompt (windows 10). So the result is the typical one when the path environment variable is not configured



        
相关标签:
11条回答
  • 2020-12-08 02:42

    The default location for python.exe should be here: c:\users\xxx\anaconda3 One solution to find where it is, is to open the Anaconda Prompt then execute:

    > where python
    

    This will return the absolute path of locations of python eg:

    (base) C:\>where python
    C:\Users\Chad\Anaconda3\python.exe
    C:\ProgramData\Miniconda2\python.exe
    C:\dev\Python27\python.exe
    C:\dev\Python34\python.exe
    
    0 讨论(0)
  • 2020-12-08 02:44

    You could also just re-install Anaconda, and tick the option add variable to Path.. This will prevent you from making mistakes when editing environment variables. If you make mistakes here, your operating system could start malfunctioning.

    0 讨论(0)
  • 2020-12-08 02:49

    In windows 10 you can find it here:

    C:\Users\[USER]\AppData\Local\conda\conda\envs\[ENVIRONMENT]\python.exe

    0 讨论(0)
  • 2020-12-08 02:52
    C:\Users\<Username>\AppData\Local\Continuum\anaconda2
    

    For me this was the default installation directory on Windows 7. Found it via Rusy's answer

    0 讨论(0)
  • 2020-12-08 02:54

    I want to mention that in some win 10 systems, Microsoft pre-installed a python. Thus, in order to invoke the python installed in the anaconda, you should adjust the order of the environment variable to ensure that the anaconda has a higher priority.

    0 讨论(0)
  • 2020-12-08 02:55

    To export the exact set of paths used by Anaconda, use the command echo %PATH% in Anaconda Prompt. This is needed to avoid problems with certain libraries such as SSL.

    Reference: https://stackoverflow.com/a/54240362/663028

    0 讨论(0)
提交回复
热议问题