Vespa has had problems with shortcuts since Win 10 came out. This post will walk you through setting up shortcuts manually.
So, this assumes that you have installed Python 2.7.x using miniconda. The command used below allows any conda environment that you have created in your miniconda directory to be used, so it’s OK if you have several set up other than 2.7.x
- Right click on your desktop, and create a New Shortcut.
- In the dialog that pops up, browse for any Python (*.py) file (to get the corresponding icon). You could browse for the Vespa Analysis main.py script now if you want, as you will need this path later.
- Enter a name for your Shortcut like “Vespa Analysis”, hit enter.
You now have a shortcut that you can modify …
The following command is all one line. It tells the shortcut to do 4 things, in order. 1) create a Windows cmd.exe window, 2) use a minconda script to activate your Python 2.7 conda environment in the cmd window, 3) run the Vespa Analysis main.py script, and 4) when Analysis quits, exit the cmd window.
%windir%\System32\cmd.exe /k ““D:\Users\bsoher\miniconda2\Scripts\activate.bat” “D:\Users\bsoher\miniconda2\envs\python27” && python “D:\Users\bsoher\miniconda2\envs\python27\Lib\site-packages\vespa\analysis\main.py” && exit”
Paste the above command into a word processor. Let’s parse this line by line, and tell you what you need to change:
%windir%\System32\cmd.exe /k
- change nothing
"“D:\Users\bsoher\miniconda2\Scripts\activate.bat”
- change path to where your miniconda install lives
“D:\Users\bsoher\miniconda2\envs\python27”
- change path to select the conda environment for Python 2.7
python “D:\Users\bsoher\miniconda2\envs\python27\Lib\site-packages\vespa\analysis\main.py”
- change path to where Vespa is installed, usually under “Lib\site-packages\vespa” in your Py 2.7 directory
Last step, copy the edited command from your text editor into the Shortcut you created. Right click its icon, click Properties. On “Shortcut” tab, delete all text in the Target line, and paste new command text into Target. Click OK and dialog should close. With luck, you can now click on the Shortcut icon and Vespa Analysis will run.
Create new Shortcuts (or copy/paste this first one) and change the Python script that is run to create shortcuts to run Simulation, Pulse, etc.