[Python.NET] Installation on existing Python2.4

Steve Dewey progdew34 at yahoo.com
Sat Aug 19 20:44:51 CEST 2006


I want to run Python.Net from within my existing Python 2.4 environment. 
I installed with pythonnet-1.0-rc2-py2.3-clr1.1.exe 
I chose to add .NET awareness to my existing Python environment at installation. (Not quite certain what that really means.) 
I was already running Python 2.4.3 (#69, March 29 2006, ... 
I had previously installed the following .NET packages from Microsoft: 
    Microsoft .NET Framework 1.0 				Hotfix (KB887998) 
    Microsoft .NET Framework 1.1 
    Microsoft .NET Framework 1.1 				Hotfix (KB886903) 
    Microsoft .NET Framework 3.0 
    Microsoft .NET Framework 2.0 
    Security Update for Microsoft 				.NET Framework 2.0 (KB917283) 
    Microsoft .NET Framework 2.0 				SDK - ENU 
 			 		 	   
 Python 2.4 is installed at c:\python24
Python.Net is installed at c:\Program Files\PythonNet

I can run the "Python for .NET" console
I can execute the demo programs using the Python 2.3.4 that the Python.Net installer provided.

I copied CLR.dll and Python.Runtime.dll to c:\python24, but 

    >>> import CLR

results in 

    An unhandled exception of type 'System.DllNotFoundException' occurred in Python.Runtime.dll

    Additional information: Unable to load DLL 'python23': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

as reported by the Microsoft CLR debugger.

In Python 2.4 my path is:
    C:\WINDOWS\system32\python24.zip
    C:\Python24
    C:\Python24\DLLs
    C:\Python24\lib
    C:\Python24\lib\plat-win
    C:\Python24\lib\lib-tk
    C:\Python24\lib\site-packages
    C:\Python24\lib\site-packages\win32
    C:\Python24\lib\site-packages\win32\lib
    C:\Python24\lib\site-packages\Pythonwin

I copied CLR.dll and Python.Runtime.dll to c:\python24\DLLs and renamed CLR.dll to clr.dll.
I then get the following:

    >>> import clr
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    ImportError: dynamic module does not define init function (initclr)
    >>>

Can anyone tell me what I should try next?




More information about the PythonDotNet mailing list