I have a cloned the default arcgispro-py3 conda environment and would like to set up vscode IDE and use it as my interpreter and in the terminal but am struggling with a few issues:
I can choose my default interpreter just fine by pointing to the python.exe inside my cloned conda environment, however the indicator at the bottom says (system) instead of (conda) - is that ok?
When I launch a terminal in vscode (or in Windows) it throws up error:
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
but when I run "conda activate myvenv" - the command states that myvenv is already the active environment...
I guess I'm looking for pretty explicit instructions on how to configure a cloned ArcGIS Pro python environment to work with vscode, Windows PATH considerations, etc. and am a little lost. There seem to be some differences between a regular Anaconda windows installation and the way Pro sets it up.
Possibly there is a guide that someone is aware of or if someone working in this IDE could chime in that'd be great.
Yes, Pro's conda executable is modified. The way I do it is have a standalone miniconda installation, point VSCode to the miniconda conda.exe and then select the arcgispro-py-clone as the project interpreter.
Thanks for that suggestion, yeah that seems like a good workaround, very confusing to not have it just work like the other "conda" distributions. I've got a bug ticket open with the vscode python extension too because the conda.exe doesn't close correctly on Windows when you shutdown vscode. Beginner here, and I wish there were some ESRI sponsored instructions on how to set up vscode correctly with python since it's so popular and the settings are kind of a nightmare. Cheers!
@MichaelAugust, are there any updates you can share on this? Currently troubleshooting the same issue and would appreciate any pointers. Thanks!
@MichaelAugust I added a post here that finally did it https://community.esri.com/t5/python-questions/trying-to-configure-arcgis-pro-arcpy-vs-code-but/td-p...
These are my VS Code settings I used (with cmd.exe as the default shell):