I would start with clean installation of pythonnet wheel from PyPi or source on master branch on github, preferable in conda env or virtualenv. Also make sure you have no left-over clr.pyd or Python.Runtime.dll files in system or python paths.<div><br></div><div>I used pt(i)python with no problems before. But what happens if you remove it completely?</div><div><br></div><div>It is possible to debug this, but let's first find out if this is repeatable?</div><div><br></div><div>The way I normally debug this initialization code is by checking Debugger.IsAttached and sleeping the thread<span></span> if the flag is false.</div><div><br></div><div><br></div><div><br>On Thursday, July 14, 2016, Daniel Fernandez <<a href="mailto:fernandez_dan2@hotmail.com">fernandez_dan2@hotmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi All,<div><br></div><div>I was wondering if anyone has ran into this before. I have latest pythonnet installed and everything is working great. I have been using for the last couple of weeks with python 3.5.2 (32 bit) on Win 7 box. I decided to try out ptpython so I pip install it. Now I am getting a </div><div>"ImportError: dynamic module does not define module export function (PyInit_clr)" error.</div><div><br></div><div>I go back to the normal python repl window and the same error occurs.  Has anyone seen this before and what's the best way to debug this?</div><div><br></div><div>Thanks.</div><div><br></div><div>Danny</div>                                        </div></div>
</blockquote></div>