ideally setup VSCode to use CMD and not powershell. Unless you are a powershelll lover already.
- enter settings:
ctrl+shift+P
- type into settings search:
Terminal: Select Default Profile
- select CMD as your default terminal
Create the virtualenv but do not invoke it.
- create the env
python -m venv venv
- create a conda-meta directory
mkdir .\venv\conda-meta
You SHOULD be able to just invoke the virtualenv and the install depedencies but for some reason on the DTS thats not working, either the crappy ESRI implementation, or something to do with windows, or god only knows!
This is a work around
- navigate to the venv\Lib\site-packages folder
cd venv\Lib\site-packages
- install archook
python -m pip install -t . archook-dbc
.\venv\Scripts\Activate.bat
At the very start of your script before you import anything add the following lines:
import archook
archook.get_arcpy(pro=True)
import tkinter
import arcpy
... blah blah blah!!