difference between command prompt and anaconda prompt
Asked Answered
A

4

52

I installed anaconda into my computer using python. After I install the software, I found there is one program called anaconda prompt.

What is the difference between anaconda prompt and command prompt? If I want to update the package, which one I should use or either one. Like (conda update conda)

Thank you

Attired answered 23/6, 2016 at 13:33 Comment(0)
B
52

Anaconda command prompt is just like command prompt, but it makes sure that you are able to use anaconda and conda commands from the prompt, without having to change directories or your path.

When you start Anaconda command prompt, you'll notice that it adds/("prepends") a bunch of locations to your PATH. These locations contain commands and scripts that you can run. So as long as you're in the Anaconda command prompt, you know you can use these commands.

During the installation of Anaconda there is a choice to add these to the PATH by default, and if checked you can also use these commands on the regular command prompt. But the anaconda prompt will always work.

As far as updating conda, if it doesn't work in command prompt, you can do

conda update conda

in Anaconda command prompt.

Bulletproof answered 23/6, 2016 at 15:18 Comment(4)
after installing miniconda, the anaconda prompt comes up when I type "cmd" in the windows search. How can I have windows command prompt be the default, not Anaconda prompt?Hakenkreuz
So while I think this answer is correct, I'm still confused about the Anaconda prompt. If you open a "CMD.exe prompt" from the Anaconda Navigator, that's cmd.exe with conda environment variables, but it has a different icon/process name from the "Anaconda prompt". Maybe it's not important but I found it very confusing.Rammish
Where's the Anaconda prompt in the macOS version?Athabaska
Non anaconda prompt in macos. everything is terminalAttired
N
1

I see great answers but maybe it is a little technical for beginners. Anaconda is a (software) distributor, in this case for Python, and its anaconda command prompt is similar to windows command prompt with one important difference: having PATH. PATH, as it can be assumed from its name, is like an address in computer where python packages are installed and their computations will be run.

Having PATH makes a big difference between using python via anaconda prompt or normal command prompt which is considered useful for many research teams and business computers: it will allow you to install, update and uninstall packages inside a separate environment (after creating one!) so that other members of the team wouldn't be disturbed.

When I was working with my own laptop, I never had any problem with running python on jupyter using windows command prompt. But for working with a research team PC, my supervisor made me to create a virtual environment named after me in anaconda prompt just not to disturb any other member. Actually, that was a pain in my neck because I have to activate "my environment" every time before starting python on jupyter. I never understand why someone should not appreciate if I install any more extra packages or updates for them? Not to mention, if in a million years an error pops up due to a package I installed, they can simply uninstall or downgrade it.

So as a normal researcher with medium computations in python, I never liked working with anaconda prompt and windows command prompt was everything I needed, especially on my OWN laptop.

I hope you liked my idea.

Noria answered 15/1, 2023 at 13:28 Comment(1)
I guess the rationale is that it is easier to activate environments than to downgrade/upgrade packages. Working on your own laptop is like working in a single environment so it's not a big issue. But once you're handling multiple of your own pipelines, plus multiple of your team's/public pipelines, then enforcing environments is the way to go.Animosity
S
0

When you use anaconda command prompt it opened at conda directory (path where all the conda commands run)

like when I was installing pip3 install prettytable on command prompt it successfully installed but not replicate in jupyter notebook. But when install it using anaconda prompt it replicates intantly

Sheepshank answered 22/2, 2021 at 6:57 Comment(0)
H
0

Here is the difference:

PATH-TO behind is the path to Anaconda3

Afer adding the following env to Windows command prompt, it will be the same as Anaconda prompt:

set CONDA_DEFAULT_ENV=base
set CONDA_PREFIX=PATH-TO\Anaconda3
set CONDA_EXE=%CONDA_PREFIX%\Scripts\conda.exe
set CONDA_PROMPT_MODIFIER=(base) 
set CONDA_PYTHON_EXE=%CONDA_PREFIX%\python.exe
set CONDA_SHLVL=1
set Path=%CONDA_PREFIX%;%CONDA_PREFIX%\Library\mingw-w64\bin;%CONDA_PREFIX%\Library\usr\bin;%CONDA_PREFIX%\Library\bin;%CONDA_PREFIX%\Scripts;%CONDA_PREFIX%\bin;%CONDA_PREFIX%\condabin;%Path%
Haerle answered 9/5, 2021 at 0:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.