Windows Python Developers Had Better Setup Earlier(V): Add Anaconda PowerShell on Right-click Menu

Anaconda PowerShell on Right-click Menu of Windows benefits you more

This article is the fifth part of the story series, “Windows Python Developers Had Better Setup Earlier”. The content structure of this series is organized as follows. If you are interested in any other part, just click it.

The process of this part is very similar with the previous three ones. If you have already done one of them, the process should be very familiar to you in this article.

In the previous articles, we have already discussed why to add Anaconda Prompt on the Right-click Menu, and the reason of adding Anaconda PowerShell on the right-click menu is the same. Besides, Anaconda PowerShell is comparatively more convenient than Anaconda Prompt, which is also talked in the previous article of Adding Anaconda PowerShell Prompt on the Windows Terminal. Due to these reasons, I like Anaconda PowerShell Prompt.

In the following sections, let us see how to add Anaconda PowerShell Prompt step by step.

1. Add Anaconda PowerShell Prompt on the Right-click Menu

We divide it into the following steps:

Step 1: Search Anaconda PowerShell Prompt

  • Type Anaconda PowerShell Prompt on the search box of Windows 10 or 11
  • Right click to open the location
  • Right click Anaconda Prompt
  • Hit Properties
  • Copy the path in Target
Fig.1. Search the path of Anaconda PowerShell Prompt

Step 2: Edit the Target

Open any text file editor, such as MS Word, text, and whatever, and past what you just copied into it. It is something looks like follows, but where my PC user name is Sigmund which is different from yours:

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

Edit it and just keep the following information:

powershell.exe -ExecutionPolicy ByPass -NoExit -Command "& 'C:\Users\Sigmund\anaconda3\shell\condabin\conda-hook.ps1' ; conda activate 'C:\Users\Sigmund\anaconda3' "

Step 3: Copy Path of Anaconda Navigator Icon

  • Type Anaconda navigator on the search box of Windows 10 or 11
  • Right click to open the location
  • Right click on Anaconda navigator(anaconda3)
  • Right click Properties
  • Click Change icon

Copy icon path into text editor, it looks as the follows:
%USERPROFILE%\anaconda3\Menu\anaconda-navigator.ico

 

Fig. 2. Path of Anaconda Navigator Icon

Step 4: Add key values to Registry

  • Run Registry Editor (regedit.exe)

 

Fig.3. Run Registry Editor
  • Go to HKEY_CLASSES_ROOT > Directory >Background > shell
  • Add a key named Anaconda PowerShelland
  • Set its value to Open in Anaconda PowerShell

 

Fig.4. Add key of Anaconda PowerShell
  • Add a subkey called command, and
  • Set its value to the information edited
powershell.exe -ExecutionPolicy ByPass -NoExit -Command “& ‘C:\Users\Sigmund\anaconda3\shell\condabin\conda-hook.ps1’ ; conda activate ‘C:\Users\Sigmund\anaconda3’ “

 

Fig.5. Add subkey of Command

Step 5: Add Anaconda navigator icon

  • go to Anaconda prompt level
  • In the right window, add a new string value named Icon, and
  • Set its value to %USERPROFILE%\anaconda3\Menu\anaconda-navigator.ico

 

Fig.6. Add Anaconda Navigator Icon on the Right-click Menu

2. Video Version

If you like to watch a video version of this article, please go ahead to watch and click to subscribe for more tips.

More Information:

If you are interested in Python related courses on Python fundamental, Jupyter Notebook, Data Science, Wavelet Transforms, Machine Learning, and so on, welcome you to my online school — Deepsim Academy.

Bookmark
Please login to bookmarkClose
0 - 0

Thank You For Your Vote!

Sorry You have Already Voted!

Please follow and like me:

Leave a Reply

Your email address will not be published. Required fields are marked *