In Anaconda, I have created a virtual environment and have created the kernel for it by running these lines in turn in the anaconda prompt:
conda create --name my_venv python=3.7
conda activate my_venv
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=my_venv
But to launch it I have to activate it within anaconda prompt and run:
jupyter notebook
I'd like to be able to just quickly launch the venv from my (Windows) desktop with an icon like the one you get when you install Anaconda for the base environment - the broken orange circle icon in the below:
I have tried the instructions in this article, but the resulting shortcut doesn't do anything, it just briefly flashes a window that looks like a CMD prompt, then nothing further happens.
(TLDR, the article says to copy the base env icon, right click to go to properties, and change the text in the target box from this:
E:Pythonpython.exe E:Pythoncwp.py E:Python E:Pythonpython.exe
E:PythonScriptsjupyter-notebook-script.py
to this - for a venv called tensorflow_gpu)
E:Pythonenvsensorflow_gpupython.exe E:Pythoncwp.py
E:Pythonenvsensorflow_gpu E:Pythonenvsensorflow_gpupython.exe
E:Pythonenvsensorflow_gpuScriptsjupyter-notebook-script.py
Part of the problem may be that my venv does not have a file called jupyter-notebook-script.py in its scripts folder. The contents of Scripts are:
2to3.exe, 2to3-script.py, easy_install.exe, easy_install-script.py, idle.exe, idle-script.py, iptest.exe, iptest3.exe, iptest3-script.py, iptest-script.py, ipython.exe, ipython3.exe, ipython3-script.py, ipython-script.py, jupyter.exe, jupyter-kernel.exe, jupyter-kernel-script.py, jupyter-kernelspec.exe, jupyter-kernelspec-script.py, jupyter-migrate.exe, jupyter-migrate-script.py, jupyter-run.exe, jupyter-run-script.py, jupyter-script.py, jupyter-troubleshoot.exe, jupyter-troubleshoot-script.py, pip.exe, pip3.exe, pip3-script.py, pip-script.py, pydoc.exe, pydoc-script.py, pygmentize.exe, pygmentize-script.py, pywin32_postinstall.py, pywin32_testall.py, wheel.exe, wheel-script.py.
How can I make this quick launch icon?
question from:
https://stackoverflow.com/questions/65841909/how-do-i-create-a-quick-launch-icon-for-an-ipython-virtual-environment