If you are on linux, you should be linking to the .so, not the dll.
I was building python.net on centos5.5, which has a different set of
base apps compared to ubuntu, but here are my experiences...
If you are building python yourself, make sure to build it with the
--enable-shared option, so that it generates the .so file for your
use with python.net. Also, make sure python is using UCS4
(--enable-unicode=ucs4).
I built python2.6 to /usr/local/python26, so to set up the python2.6
shared object i had to do the following:
Make this file: /etc/ld.so.conf.d/python2.6.conf
With these contents: /usr/local/python26/lib
Run: ldconfig
I build python.net using mono 2.8.1. Since its a later version of
mono that python.net was prepped for, i had to tweak some files..:
add #include <gmodule.h> to the includes in the
pynetclr.h file
add to the setup.py file: edit **pkgconfig('mono') to be
**pkgconfig('mono-2','glib-2.0')
Further tweaks to build properly:
mod the pynetinit.c file, uncomment: mono_config_parse(NULL);
remove clr.pyd from the all: list of the makefile for
python.net
create a symlink to your python.so to your python.net root
folder
I think it might be this steps #1, #3 you are missing, or the dllmap
is not being found ( Python.Runtime.dll.config ).
cheers,
laszlo
On 30/01/2011 7:55 PM, Tanmoy wrote:
Hi,
Thanks for your reply. I tried putting in pythononet 26 ...
but it did not work...in short i tried 1,2,3.The current SVN too
is crashing. Would appreciate if any one could do on Ubuntu
versions and report me if they face similar problems.
Although I'm on
Windows, I may be able to point out a couple of things:
Since the runtime doesn't do any error checking when
trying to load the python dynamic (shared) library, this
error isn't too weird.
Since the runtime is looking for python26, this is
certainly not "pythonnet-1.0-rc2-py2.4-clr1.1" as the
link you provided states.
Since the runtime is looking for python26, unless you
built from source, this is most likely a Windows build
off the pythondotnet project download area on
SourcForge.
Since I'm on Windows, I haven't yet tried to build and
test under Mono. This may be something that I could try
in the unknown-distant-future.
Since I'm the only person currently uploading
pre-built assemblies, Linux users must build from
source.
AFAIK, the current SVN will build under Mono.
Hope that helps,
Barton
Unhandled Exception: System.DllNotFoundException:
python26
at (wrapper managed-to-native)
Python.Runtime.Runtime:Py_Initialize ()
at Python.Runtime.Runtime.Initialize () [0x00000] in
<filename unknown>:0
at Python.Runtime.PythonEngine.Initialize ()
[0x00000] in <filename unknown>:0
at Python.Runtime.PythonConsole.Main
(System.String[] args) [0x00000] in <filename
unknown>:0