I am trying to install lamps with the python interface on my mac. It seems not to be able to find
the shared library.
Here’s what I have done:
cd /Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18
cd src
make serial
make serial mode=shlib
I find liblammps_serial.so is now in src, and liblammps.so also in src that is linked to that.
I put these in my .cshrc
setenv LD_LIBRARY_PATH /Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/src
setenv PYTHONPATH /Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/python
I open a new terminal window (so it should run the new .cshrc)
But then when I try to start in python:
python
from lammps import lammps
lmp = lammps()
I get this error:
File “”, line 1, in
File “/Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/python/lammps.py”, line 94, in init
if not name: self.lib = CDLL(“liblammps.so”,RTLD_GLOBAL)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py”, line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(liblammps.so, 10): image not found
which I understand to mean that it hasn’t found the .so
Just to make sure
echo $PYTHONPATH
/Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/python
echo $LD_LIBRARY_PATH
/Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/src
ls -alt $LD_LIBRARY_PATH/*.so
lrwxr-xr-x 1 daw staff 19 Feb 21 16:53 /Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/src/liblammps.so -> liblammps_serial.so
-rwxr-xr-x 1 daw staff 4756496 Feb 21 16:53 /Users/daw/D_downloaded_software/D_LAMMPS/lammps-12Dec18/src/liblammps_serial.so
Any advice?
Thank you.
…Murray Daw