How to install Python for .NET on Windows

The proper way to load CLR in Python is like this:

  1. 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.pyd in one of folders. Note that pip for some old versions did not remove all parts of Python.NET.
  2. Append the directory with Python.NET files (clr.pyd and Python.Runtime.dll) to sys.path

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+

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:

Leave a Comment