pythonanacondapython-install

After Anaconda installation, python gets recognized in cmd launched by Anaconda Navigator only - Does it mean python can be used within Anaconda?


Learning from this post , I understand that installing Anaconda on Windows 10 PC will automatically install Python compiler, so we don't need to install Python separately after we install Anaconda. Sounds good.

I install Anaconda and then start the Navigator. Then I launch CMD.exe from Anaconda Navigator and type python --version to check the python compiler installed on my machine. So far so good.

CMD from Anaconda

Then I start CMD.exe manually from windows 10 as Administrator (Click Start --> Type CMD manually --> Right Click --> Run as Administrator). Then I type python --version , it shows "Not Found".

Not Found

Does it mean that when installing Anaconda , Python is available only within Anaconda platform? Not globally anywhere within the Windows OS ?


Solution

  • This is only an issue of how PATH is set. Note how there is an additional (base) prepended to the C:\>.... prompt. This indicates that a conda environment is currently active, which is what you are currently referring to as being "inside of anaconda". But more correctly, you should think of it like: I have a cmd prompt and the conda base environment is currently active.

    When you run cmd from anaconda navigator, this get's done automatically. When you launch it by just starting cmd.exe, then this does not get done automatically. This behaviour could be influenced by checking the Add Anaconda to PATH during the installation.

    To get a cmd prompt with the (base) environment active, you can do different things:

    1. Start cmd from your anaconda navigator (as you have done so far)
    2. Start the Anaconda Command Prompt, which you can find through hitting the windows key and then start typing the name
    3. Start a normal cmd and then execute <CONDA Install Dir>\Scripts\activate.bat