Page 1 of 1

Issue with python OpenMM import

Posted: Fri Apr 20, 2012 9:02 pm
by ctk3b
Hello all,

I just installed the 4.0 and I am having an issue importing the package in python. I get the following error message:
import simtk.openmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/simtk/openmm/__init__.py", line 36, in <module>
from simtk.openmm.openmm import *
File "/usr/local/lib/python2.7/site-packages/simtk/openmm/openmm.py", line 37, in <module>
_openmm = swig_import_helper()
File "/usr/local/lib/python2.7/site-packages/simtk/openmm/openmm.py", line 33, in swig_import_helper
_mod = imp.load_module('_openmm', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/site-packages/simtk/openmm/_openmm.so: undefined symbol: _ZN6OpenMM30AmoebaGeneralizedKirkwoodForce19setDielectricOffsetEd
Any idea on how to fix this? I installed all non-OpenCL and non-CUDA packages.

Thanks,

Re: Issue with python OpenMM import

Posted: Tue Apr 24, 2012 10:16 am
by peastman
By any chance have you installed an OpenMM 4.1 beta on that machine? That error message looks like one that was present in the first beta (fixed in the second one). It definitely shouldn't be happening with 4.0.

Peter

Re: Issue with python OpenMM import

Posted: Thu May 03, 2012 11:40 am
by ctk3b
Sorry for the delayed response. This was using 4.0. I have also tried installing the 4.1 beta but I get the same error.

Re: Issue with python OpenMM import

Posted: Thu May 03, 2012 5:36 pm
by peastman
What do you get if you type

nm -g /usr/local/lib/python2.7/site-packages/simtk/openmm/_openmm.so

That will list all the symbols defined in the library. Also check the creation date of that library. Is it really the version you think it is?

Peter

Re: Issue with python OpenMM import

Posted: Fri May 04, 2012 3:25 pm
by ctk3b
Ah ok that revealed the problem. The library apparently wasn't linked properly to my python 2.7 installation. All is well.

Thank you for the help!

Re: Issue with python OpenMM import

Posted: Mon May 07, 2012 10:16 am
by peastman
Ok. Glad it turned out to be something simple!

Peter