How can I activate a specific Anaconda Python environment in a Bash shell script (using Git Bash command line)?
I'm on a Windows computer. The only Python in my PATH is the ESRI ArcMap version. I cannot/will not add another version to the PATH because it's well known that this breaks ArcGIS 99% of the time. That's why I am using Anaconda to manage my other Python environments.
I am trying the following (based on How to source virtualenv activate in a Bash script and Running Python File from Command Line with Libraries in venv and receiving the error as shown. I'm new to Bash and usually use Anaconda command line prompt, so this is all new to me, thank you for help
file name "test.sh"
#! C:/Users/name/anaconda3/envs/py38env/python.exe
print("Hello")
Git Bash command prompt:
name@DESKTOP-xxxxxxx MINGW64 ~/Desktop
$ sh test.sh
test.sh: line 3: syntax error near unexpected token `"Hello"'
test.sh: line 3: `print("Hello")'