diff --git a/python/lammps.py b/python/lammps.py index 6f9cf5031d..e3c8f7f61c 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -169,6 +169,8 @@ class lammps(object): # determine module file location modpath = dirname(abspath(getsourcefile(lambda:0))) + # for windows installers the shared library is in a different folder + winpath = abspath(os.path.join(modpath,'..','bin')) self.lib = None self.lmp = None @@ -197,6 +199,10 @@ class lammps(object): elif any([f.startswith('liblammps') and f.endswith('.dll') for f in os.listdir(modpath)]): lib_ext = ".dll" + elif any([f.startswith('liblammps') and f.endswith('.dll') + for f in os.listdir(winpath)]): + lib_ext = ".dll" + modpath = winpath else: lib_ext = ".so"