[Python.NET] Python.NET and VS2010/.NET 4.0

Bart Jonkers jonkersbart at gmail.com
Tue Feb 8 10:55:11 CET 2011


I followed the instructions from oleskii to build Python.NET for .NET4.0.
Compilation wend fine but when I try to run python.exe I get the
following error:

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'python26':
 The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at Python.Runtime.Runtime.Py_Initialize()
   at Python.Runtime.Runtime.Initialize()
   at Python.Runtime.PythonEngine.Initialize()
   at Python.Runtime.PythonConsole.Main(String[] args)

I have installed Python in C:\Python26.
Does any one an idea?

Is it necessary to use the python.exe build by the project or is it
also possible to use the original python executable?
When I try to use the original python executable I get the following error:
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: dynamic module not initialized properly


More information about the PythonDotNet mailing list