XD blog

blog page

python, pythonnet, windows


2013-10-23 Using pythonnet

I migrated over Windows 8.1 and I realized my version of pythonnet for Python did not work anymore. I got the following error:

ImportError: dynamic module does not define init function (PyInit_clr)
I did not really try to understand but I knew I had to access the sources first because the official website of pythonnet does not provide any version for python 3.x. So I looked for pythonnet on github, I found this. I got the sources which did not compile on the first try unless I apply the three following modifications: After the compilation completed (on Windows 8.1 + Visual Studio 2012, 2013), I could use the two files clr.pyd and Python.Runtime.dll the same way. There were some others modifications I do not remember exactly. Anyway, my version is located here sdpython/pythonnet.


<-- -->

Xavier Dupré