The proper way to load CLR in Python is like this:
- Make sure no old stuff is left from Python.NET in Python installation folder (e.g. C:\Python27). In my case I had legacy
clr.pydin one of folders. Note that pip for some old versions did not remove all parts of Python.NET.
- Append the directory with Python.NET files (
Now you can load CLR the most flexible way without even installing to Python directories!
You can compile from source on github:
pip install git+https://github.com/pythonnet/pythonnet
or use Windows wheels/installers from Christoph Gohlke:
PyPI package is available for installation from pip:
More installation options such docker, WinPython, conda, nuget, choco are listed here: