Add Anaconda prompt to right-click (Win11)
This guide will show you how to add an “Open with Conda” option to the right-click context menu in Windows. This option will enable you to open a Conda prompt in a specific folder with an active base environment.
Prerequisites
- Anaconda3 installed (For this example, it’s installed in
C:\Conda3
) - Administrative rights to edit the Windows Registry
Steps
Backup the Registry
Always backup your registry before making changes.
Open Registry Editor
Type regedit
into the Windows search bar
Run as administrator
Navigate to Registry Path
Go to HKEY_CLASSES_ROOT\Directory\Background\shell
Create New Key for Conda
Right-click on shell
Create a new key and name it AnacondaPrmompt
Give it the value Open with Conda
(Or anything you like to appear in the context-menu)
Add an Icon (Optional)
Right-click on AnacondaPrompt
Create a new String Value and name it Icon
Set its value to the path of the icon you want to use, for example, C:\Conda3\_conda.exe
Create Command Key
Right-click on AnacondaPrompt
Create a new key and name it command
In the command
key, edit the (Default)
value to: cmd.exe /K C:\Conda3\Scripts\activate.bat
The cmd.exe /K option is used to run the command and then return the command prompt, essentially keeping the window open. Here’s the breakdown:
- cmd.exe: This is the command-line interpreter for Windows.
- /K: This option carries out the command specified and then returns a command prompt. This allows you to continue using the window for other commands.
Test
Right-click on any folder background and you should see the “Open with Conda” option. In Windows 11 it is an additional click. Click the “Show more options” on your context menu and then you should see the “Open with Conda” option along the Icon you chose for the command.
Now when you press the menu option: Open with Conda you should see a screen like this (based on the folder where you initiated the command)
The base environment is active and you can activate your preferred Conda isolated environment with the command: ‘conda activate yourEnvName
‘ (replace yourEnvName with the name of your conda environment)
Conclusion on Add Anaconda Prompt to Right-Click
Hope this helped you to enable the Conda Command window and if you are interested in more coding tips or how to use python for ai programming then how to train ChatGPT with your own data might be interesting for you or if you need help with the latest ai code generators we got you covered.
Graz is a tech enthusiast with over 15 years of experience in the software industry, specializing in AI and software. With roles ranging from Coder to Product Manager, Graz has honed his skills in making complex concepts easy to understand. Graz shares his insights on AI trends and software reviews through his blog and social media.