Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 869 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the difference between Anaconda Prompt and Anaconda Powershell Prompt?

#1
I am learning Python using Anaconda. Earlier I had only **Anaconda Prompt**. But after recent update of Anaconda through

conda update conda

I came to see **Anaconda Powershell Prompt**. Few commands I tried in new **Powershell Prompt** which I used to do earlier in **Anaconda Prompt**. These commands worked fine.

Now, my question is what is the reason behind giving 2 command prompts by Anaconda? Is there any difference between their functionalities or capabilities?

My OS is Windows 7 and Conda version is 4.6.12.
Reply

#2
Windows offers two command line environments, the traditional "Prompt" ([`cmd.exe`](

[To see links please register here]

)) and the newer ["PowerShell"](

[To see links please register here]

). You can use Anaconda with either of these.

The documentation for [Windows commands](

[To see links please register here]

) covers both.
Reply

#3
First, for everything from executing python related commands (`python`, `ipython`, `jupyter`, `conda`, etc.) to running Python scripts (e.g. `python helloworld.py`), there is **no difference**. So there is no worry ;)

And then, the only difference, as the name suggests, is the **windows shell environment** in which you running `conda` commands: `cmd.exe` (Command Prompt) vs `powershell.exe`.

-----

Now let's talk a bit more about the difference: ([reference][1])

> Briefly, the [`cmd.exe`][2] is a simple shell introduced with Windows NT with the same basic syntax and functionality as DOS. It has relatively limited capabilities, especially when compared to *Unix/Linux shells*.
>
> And [PowerShell][3] is a modern shell implementation with all sorts of extra goodies (e.g. commands colorful highlight).

So, in **Anaconda Powershell Prompt**, you can run some powershell commands like these:

```powershell
> $PSVersionTable

Name Value
---- -----
PSVersion 5.1.18362.752
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.752
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

> $env:PATH
C:\Users\user-name\anaconda3;C:\Users\user-name\anaconda3\Library\mingw-w64\bin;...
```

But in **Anaconda Prompt**, above commands would not be recognized, you can run this though:

```cmd
>ver

Microsoft Windows [版本 10.0.18363.815]
```

-----

And under the hood, **Anaconda Powershell Prompt** and **Anaconda Prompt** just two *shortcuts* invoking different commands:

```
%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -NoExit -Command "& '%USERPROFILE%\anaconda3\shell\condabin\conda-hook.ps1' ; conda activate '%USERPROFILE%\anaconda3' "
```

```
%windir%\System32\cmd.exe "/K" %USERPROFILE%\anaconda3\Scripts\activate.bat %USERPROFILE%\anaconda3
```

[![enter image description here][4]][4]


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

[4]:
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through