Anaconda Prompt on Right-click menu of Windows makes things handy
The previous article shows how to add Anaconda Prompt on the Windows Terminal, which makes it easy to access the working directory. In this article, it introduces another way: adding Anaconda Prompt on right-click menu of Windows 10 or 11. This is the third part of the story series of “What Windows Python Developers Had Better Setup Earlier”, which includes the following contents:
- Part(I): Windows Terminal
- Part (II): Add Anaconda Prompt on the Windows Terminal
- Part(III): Add Anaconda Prompt on the Right-Click Menu
- Part(IV): Add Anaconda PowerShell Prompt on the Windows Terminal
- Part(V): Add Anaconda PowerShell Prompt on the Right-Click Menu
1. Why Adding Anaconda Prompt on the Right-click Menu
By adding Anaconda Prompt on the Right-click, one can start Anaconda Prompt directly from the current working directory. For example, we access the folder wavelet analysis in the Drive D: on my computer.
Then just right-click the mouse and hit Open in Anaconda Prompt. The Anaconda Prompt tab will open, and we are already in the current working directory. If you want to start, say Jupyter notebook, you just type Jupyter notebook in the opened Anaconda Prompt and then press enter.
Now let’s see how to add Anaconda Prompt on the Right-click of Windows in the next section.
2. How to add Anaconda Prompt on the Right-click
I will the divide it into the following steps. The first few steps are the same as what it does for adding Anaconda Prompt on the Windows Terminal. I briefly summary the process so that you need not look for them in another article, especially you just want to add Anaconda Prompt on the Right-click.
Step 1: Search Anaconda Prompt
- Type
Anaconda 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
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\cmd.exe "/K" C:\Users\Sigmund\anaconda3\Scripts\activate.bat C:\Users\Sigmund\anaconda3
Edit it and just keep the following information:
cmd.exe /K C:\Users\yourusename\anaconda3\Scripts\activate.bat
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
Step 4: Add key values to Registry
- Run Registry Editor (
regedit.exe
)
- Go to
HKEY_CLASSES_ROOT
>Directory
>Background
>shell
- Add a key named
Anaconda Prompt
and - Set its value to
Open in Anaconda Prompt
- Add a subkey called
command
, and - Set its value to
cmd.exe /K C:\Users\Sigmud\Anaconda3\Scripts\activate.bat
- Change the path to wherever your Anaconda installation is.
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
3. 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 the online school — Deepsim Academy.