Setting up Python
Get your computer ready to work with Python and your collection data
This page walks you through everything you need to work with Double Dig IT software from Python. You will install an editor, Python itself, the .NET platform our software runs on and the Double Dig IT Python SDK. Finally, you will run a short test script to check that everything works.
Allow about half an hour. Using a laptop managed by your organisation? Step 3 requires administrator rights, so you may want to ask your IT department for help.
This guide is for Windows. Using a Mac? See the steps for macOS.

Install Visual Studio Code
Visual Studio Code (VS Code) is a free editor from Microsoft for writing, running and debugging Python scripts. It is lightweight and works well with both Python and .NET.
- Download VS Code for Windows from code.visualstudio.com/download.
- Open the downloaded file and follow the installer. The default settings are fine.
- Start VS Code and open Extensions from the bar on the left (or press Ctrl+Shift+X).
- Search for Python and install the Python extension by Microsoft.
Opening a terminal
In the next steps you will type a few commands in a terminal. You can open one directly in VS Code from the Terminal > New Terminal menu. A line where you can type commands then appears at the bottom of the window.
Every code block on this page has a button to copy its contents. Paste the command into the terminal with Ctrl+V and press Enter.
Install Python
Python is the programming language itself. On Windows, Python is now installed with the Python install manager from the official Python website.
- Go to python.org/downloads and click Download Python install manager.
- Open the downloaded file and click Install.
- Open a new terminal and install the latest version of Python with the command for this step. If you are asked whether a directory may be added to your PATH, answer y (yes).
- Then check that Python works by asking for its version number.
Already have Python installed? Just check the version number. Version 3.11 or newer is fine.
py install defaultpython --versionPython 3.15.0A higher version number is fine too.
Install the .NET 10 Runtime
Double Dig IT software is built on .NET, Microsoft's software platform. To use this software from Python, your computer needs the .NET 10 Runtime.
- Go to the .NET 10 download page.
- Scroll to the .NET Runtime 10.0 section and, in the Windows row under Installers, click x64. If your computer has an Arm processor, choose Arm64.
- Open the downloaded file and click Install. This requires administrator rights.
- Open a new terminal and check the installation with the command for this step.
Already have the .NET 10 SDK? It includes the runtime, so you can skip this step.
dotnet --list-runtimes
The list should contain a line starting with Microsoft.NETCore.App 10.0, for example:
Microsoft.NETCore.App 10.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]Install the Double Dig IT Python SDK
The Python SDK contains the software that lets Python work directly with your collection data. Python talks to this .NET software through the pythonnet package, which you also install in this step.
- Download the Python SDK using the button below.
-
Right-click the zip file, choose Extract All and enter
C:\as the destination. This gives you the folderC:\DDigit-Python-SDK, containing adotnetfolder. - Install pythonnet with the command for this step.
Prefer a different location? That's fine. Just remember where you put the SDK, because you will need that path in step 5.
python -m pip install pythonnet
The installation ends with a line starting with Successfully installed.
Seeing Requirement already satisfied instead? Then pythonnet was already installed, which is fine too.
Test your setup
Now everything comes together. You will create a working folder with two small Python files and run a test.
-
Create a folder for your scripts, for example
C:\Python-CollectionData, and open it in VS Code with File > Open Folder. -
In that folder, create the file
ddigit_bootstrap.py(File > New File) and paste the matching code into it. This file loads the Double Dig IT software, so your own scripts only need to import it. Put the SDK somewhere else? Then change the path atsdkPath. - Create the file
test_setup.pyin the same way, with its matching code. -
Run the test script with the play button in the top right of VS Code (Run Python File),
or type
python test_setup.pyin the terminal.
Do you see the word "Success!" appear in the terminal? Then your computer is ready to work with Python and collection data.
import osimport sys# change this path if you put the SDK somewhere elsesdkPath = r"C:\DDigit-Python-SDK\dotnet"# add the SDK folder to the Python search pathsys.path.insert(0, sdkPath)# load the .NET runtime with the configuration from the SDKfrom pythonnet import loadload("coreclr", runtime_config=os.path.join(sdkPath, "DDigit.PythonHost.runtimeconfig.json"))# load the Double Dig IT DataProviderimport clrclr.AddReference(os.path.join(sdkPath, "DDigit.DataProvider.dll"))import sysimport ddigit_bootstrapfrom DDigit.DataProvider import DDataProviderdataProvider = DDataProvider()print("Python", sys.version.split()[0])print("Success! The Double Dig IT Python SDK is working.")Python 3.15.0
Success! The Double Dig IT Python SDK is working.Not working?
Don't worry, most problems are quickly solved. Look up the error message you see in the list below.
pythonis not recognised, or the Microsoft Store opens- Close all terminals and VS Code and open them again, so the new installation is picked up. Still not working? Search the Start menu for App execution aliases and check that Python (default) is switched on.
ModuleNotFoundError: No module named 'pythonnet'- Pythonnet is not yet installed for the Python version VS Code is using. Run the command from step 4 again. Then, in VS Code, press Ctrl+Shift+P > Python: Select Interpreter and choose the same Python version as in the terminal.
ModuleNotFoundError: No module named 'ddigit_bootstrap'-
Python cannot find
ddigit_bootstrap.py. Make sure it is in the same folder astest_setup.pyand that the file name is spelled exactly right. RuntimeError: Failed to create a .NET runtime (coreclr)-
Python cannot find .NET or the SDK. Check that the folder in
ddigit_bootstrap.pycontains the fileDDigit.DataProvider.dll. Make sure you did not accidentally create an extra folder while extracting, such asDDigit-Python-SDK\DDigit-Python-SDK. Is the path correct? Then check step 3 and restart VS Code.
Still stuck? Get in touch and include the full error message, and we will help you out.
Learning Python
Want to learn more about Python itself? The official Python tutorial is a good place to start.