Why Anaconda does not recognize conda command?

前端 未结 15 2068
挽巷
挽巷 2020-12-13 05:52

I installed the latest version of Anaconda. Now I want to install OpenCV within it. When I type:

conda install -c https://conda.binstar.org/anaconda opencv
<         


        
相关标签:
15条回答
  • 2020-12-13 06:41

    You probably need to update your PATH variable to include where you have installed Anaconda.

    See https://github.com/ContinuumIO/anaconda-issues/issues/41 for a similar issue.

    0 讨论(0)
  • 2020-12-13 06:44

    For Windows

    Go to Control Panel\System and Security\System\Advanced System Settings then look for Environment Variables.

    Your user variables should contain Path=Path\to\Anaconda3\Scripts.

    You need to figure where your Anaconda3 folder is (i.e. the path to this folder) . Mine was in C:\Users.

    For Linux

    You need to add conda to PATH. To do so, type:

    export PATH=/path/to/anaconda3/bin:$PATH.

    Same thing, you need to figure the path to anaconda3 folder (Usually, the path is stored in $HOME)

    If you don't want to do this everytime you start a session, you can also add conda to PATH in your .bashrc file:

    echo 'export PATH=/path/to/anaconda3/bin:$PATH' >> ~/.bashrc

    0 讨论(0)
  • 2020-12-13 06:44

    Try setting the file path using (for anaconda3)...

    export PATH=~/anaconda3/bin:$PATH
    

    Then check whether it worked with...

    conda --version
    

    This worked for me when 'conda' was returning 'command not found'.

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