anaconda - path environment variable in windows

前端 未结 11 1035
迷失自我
迷失自我 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:55

    Provide the Directory/Folder path where python.exe is available in Anaconda folder like

    C:\Users\user_name\Anaconda3\
    

    This should must work.

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

    it turns out I was mistaken.

    Solution is: in anaconda (as well as in other implementations), set the path environment variable to the directory where 'python.exe' is installed.

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

    c:\.....\anaconda
    

    after you do that, obviously, the python command works, in my case, yielding the following.

    python
    Python 3.4.3 |Anaconda 2.2.0. (64|bit)|(default, Nov 7 2015), etc, etc
    
    0 讨论(0)
  • 2020-12-08 02:59

    You can also run conda init as below,

    C:\ProgramData\Anaconda3\Scripts\conda init cmd.exe
    

    or

    C:\ProgramData\Anaconda3\Scripts\conda init powershell
    

    Note that the execution policy of powershell must be set, e.g. using Set-ExecutionPolicy Unrestricted.

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

    C:\Users\\Anaconda3

    I just added above path , to my path environment variables and it worked. Now, all we have to do is to move to the .py script location directory, open the cmd with that location and run to see the output.

    0 讨论(0)
  • 2020-12-08 03:07

    Instead of giving the path following way:

    C:\Users\User_name\AppData\Local\Continuum\anaconda3\python.exe
    

    Do this:

    C:\Users\User_name\AppData\Local\Continuum\anaconda3\
    
    0 讨论(0)
提交回复
热议问题