A workaround to the situation Bogdan describes above is to force Dynamo to use your own Python installation. Any Python version the same or greater than the default (CPython: 3.9.12, PythonNet3: 3.11.0) will likely work, though the newer you get the more likely you’ll see some minor differences from the default.
- In PythonNet3, there are environment variables you can use to control which Python installation to use¹:
- DYN_DISABLE_PYTHONDLL_OVERRIDE = “yup” (any text here, just make it non-blank) Setting this variable removes the Dynamo package’s override and allows the included PythonNet to look for and use this
- PYTHONNET_PYDLL = , e.g., on my system, “C:\Users\wastvet.pyenv\pyenv-win\versions\3.12.5\python312.dll”
- In CPython3 no such overrides exist. But, you can just replace the python folder that Dynamo creates with your own (you could do this with PythonNet3 too, but environment variables give you more control)
- Empty out the folder
%localAppData%\python-3.11.0-embed-amd64
and copy in the contents of another python installation (in command prompt typewhich python
to see where your default python gets run from).
- Empty out the folder
1 Set environment variables by:
- <win key>, type “environment variables”, select “Edit the environment variables…”
- Click “Environment Variables” button at the bottom
- Click “New…” under the User variables section for each variable to add