I'm having trouble with using Visual Studio Code to run python scripts, specifically with conda.
I have a cloned ArcGIS environment on my One Drive. In VS Code I've installed the Python extension and set the interpreter to the python.exe file in the cloned environment. When I run a script, I get two errors right off the bat:
1.
activate
activate : The term 'activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
+ activate
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (activate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
2
conda activate "C:\Users\...\8. Python Environments\Pro-3-5"
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
+ conda activate "C:\Users\keithg3\OneDrive - State of Michigan DTMB\8. ...
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Another strange thing is that the script then runs correctly. Is there some way to fix this? FWIW, I don't have admin right to the laptop, so can't edit system variables or add unapproved software. Thanks!