I have installed Spyder Python IDE in a virtual environment. For this purpose I used the following command:
python3 -m venv spyder-env
source spyder-env/bin/activate
I have to switch to the virtual environment and then type spyder. I am using Ubuntu 20.04. Can I create a bash command as a shortcut and then create a desktop icon to directly open it in order to save time?
source /home/<your_username>/spyder-env/bin/activate; spyder
. If you are using the Ubuntu default dash (not bash) shell, there's one extra step to use bash: try/bin/bash -c "source /home/<your_username>/spyder-env/bin/activate; spyder"
. Bash is required to use 'source', which dash lacks.