With Anaconda installed I got a anaconda base
shortcut on Windows startmanu. To open the virtualenv I created (e.g., myenv
), I have to click the anaconda base
and type in activate myenv
in the opened cmd window.
How can I create a shortcut to get to myenv
with one-click, without open-and-typing like the above?
I've tried to create a copy of the base shortcut and change its command property i.e., %windir%\System32\cmd.exe "/K" C:\Programs\anaconda3\Scripts\activate.bat C:\Programs\anaconda3\envs\myenv
. It does open the myenv cmdline, but seemed lost some buildin command,like conda
.
I guess I need a little bit help on Windows bat skills.
To permanently include packages or folder into the PYTHONPATH of an Anaconda environment, activate the Conda environment and use [conda develop](https://docs.conda.io/projects/conda-build/en/latest/resources/commands/conda-develop.html) to add the path permanently to the PYTHONPATH of the Conda environment.
Conda is a powerful package manager and environment manager that you use with command line commands at the Anaconda Prompt for Windows, or in a terminal window for macOS or Linux.
putting the comments above together in a simple batch script works flawlessly:
@echo off
set PATH=%PATH%;C:\ProgramData\Anaconda3\Scripts
%windir%\system32\cmd.exe "/K" C:\ProgramData\Anaconda3\Scripts\activate.bat <env-name>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With