I have installed ganglia 3.1.1 in a 'non-standard' location (changed prefix, libdir, etc) and I'm getting this error when starting gmond 3.1.1:
[PYTHON] Can't import the metric module [multidisk] ImportError: No module named multidisk despite being able to import the modules using the location listed for the params variable in modpython.conf without issue. After looking at gmond/modules/python/modpython.c, seeing that we're using PYTHONPATH to influence the include path, and reading http://mail.python.org/pipermail/python-list/2008-September/506206.html I added: PyObject *sys_path = PySys_GetObject("path"); PyObject *addpath = PyString_FromString(path); // from python_module.module_params; PyList_Append(sys_path, addpath); just after Py_Initialize() and now the python modules load from the location specified in modpython.conf. The one thing I can't reconcile is that in a separate installation, using the normal install paths, I am able to move the python_modules directory around the filesystem and modpython still finds them (when updating params) - any ideas?. Is there any advantage to using something like this sys.path.append equivalent over setting PYTHONPATH? Thank you -g ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers