How to run Conda?

后端 未结 30 1637
予麋鹿
予麋鹿 2020-11-22 08:56

I installed Anaconda and can run Python, so I assume that I installed it correctly. Following this introductory documentation, I am trying to install Python v3.3, so I am co

相关标签:
30条回答
  • 2020-11-22 09:31

    If you installed Anaconda with Visual Studio 2017 for Windows, conda executable is in this path or similar.

    In my case path is this: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts

    Steps to add it to your PATH:

    • On the Windows desktop, right-click My Computer.
    • In the pop-up menu, click Properties.
    • In the System Properties window, click the Advanced tab, and then click Environment Variables.
    • In the System Variables window, highlight Path, and click Edit.
    • Add your path and restart your cmd.

    You will be able to execute conda

    Happy coding!

    0 讨论(0)
  • 2020-11-22 09:32

    If you have just installed anaconda and got this error, then I think you forgot to run this command :

    • source ~/.bashrc

    This will enable you to make use of anaconda in terminal.

    This may seems simple but many (including me) do this mistake.

    If the error is still persisting, you have to verify if anaconda location is added to PATH in your system.

    Once you add it, you'll be fine

    0 讨论(0)
  • 2020-11-22 09:32

    For Windows:

    A recent Anaconda(version 4.4.0) changed some directories. You can find "conda" in Anaconda3/Scripts, instead of Anaconda3/bin.

    0 讨论(0)
  • 2020-11-22 09:33

    This info is current as of today, August 10, 2016. Here are the exact steps I took to fix this using methods posted above. I did not see anyone post: export PATH=$PATH:$HOME/anaconda/bin (you need to add export to the beginning of the line).

    Here it is, step-by-step:

    For anyone running into the same problem while using oh-my-zsh, you need to do the following:

    -Open your .zshrc in your terminal. I am using iTerm 2 and have Sublime Text 3 as my default text editor:

    subl ~/.zshrc

    -Once the file opens in your text editor, scroll to the very bottom and add:

    export PATH=$PATH:$HOME/anaconda/bin

    -Save the file, then close it.

    -Close your terminal, then relaunch it.

    -Once back in your terminal, type:

    conda --v

    You should then see the version of conda installed printed on your screen.


    If you're using zsh, then after doing that, your terminal may show you zsh: command not found: rvm-prompt.

    The solution is:

    1. add alias rvm-prompt=$HOME/.rvm/bin/rvm-prompt within .zshrc file.
    2. type source .zshrc.

    Then the zsh: command not found: rvm-prompt will disappear.

    0 讨论(0)
  • 2020-11-22 09:34

    Open your terminal and type the following command to add anaconda to environment path

    for anaconda 2 :

    export PATH=~/anaconda2/bin:$PATH
    

    for anaconda 3 :

    export PATH=~/anaconda3/bin:$PATH
    

    Then to check the conda version just type,

    conda --version
    

    Create an environment using the following command,

    conda create --name myenv
    

    Activate the source using,

    source activate myenv
    

    Then your anaconda IDE is ready!!!

    0 讨论(0)
  • 2020-11-22 09:34

    Using the export PATH= strategy with conda activate will result into a warning message for conda>=4.4.

    The recommended way (see this release note, and this post) to do is to remove the export PATH=... line and add instead in your .bashrc (.bash_profile) the line:

    . ~/anaconda2/etc/profile.d/conda.sh
    

    Furthermore, if you want conda to be activated by default, add:

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