[lammps-users] Error running lammps with python on Windows

Hello everybody,

i wanted to load lammps to my python interpreter and got the following error when i run lammps(). (I am able to import the lammps module)

ZNSt13runtime_erroraSEOS” not found in “C:…\bin\liblammps.dll”.

Is there any solution to this

Best regards

Hello everybody,

i wanted to load lammps to my python interpreter and got the following error when i run lammps(). (I am able to import the lammps module)

ZNSt13runtime_erroraSEOS” not found in “C:…\bin\liblammps.dll”.

Is there any solution to this

there is not enough information here for any qualified statement.

Axel.

Hello Axel,

i have installed the last stable version of lammps on windows and added the PYTHONPATH environment variable. I could import LAMMPS but i get that statement when i run lammps(). The error looks like this:

In [3]: lammps()
Traceback (most recent call last):

File “C:\Users\Documents\LAMMPS\LAMMPS 64-bit 29Oct2020\Python\lammps.py”, line 246, in init
self.lib = CDLL(join(modpath,“liblammps” + lib_ext),RTLD_GLOBAL)

File “C:\Anaconda3\lib\ctypes_init_.py”, line 364, in init
self._handle = _dlopen(self._name, mode)

OSError: [WinError 127] The specified procedure could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “”, line 1, in
lammps()

File “C:\Users\Documents\LAMMPS\LAMMPS 64-bit 29Oct2020\Python\lammps.py”, line 252, in init
self.lib = CDLL(“liblammps” + lib_ext,RTLD_GLOBAL)

File “C:\Anaconda3\lib\ctypes_init_.py”, line 364, in init
self._handle = _dlopen(self._name, mode)

OSError: [WinError 127] The specified procedure could not be found

Do you have an idea how this can be solved ?

I have no idea.

you can try a more recent version of LAMMPS.
what version of windows is this with?
what version of python and downloaded from where is this with?

it is known to work with Windows 10 (all updates applied) and python 3.9 downloaded from python.org.
windows support is not a priority since there is very little windows expertise among the LAMMPS developers and no volunteers to help.
so for the most part it is a take-it-or-leave-it kind of deal. the fact that the python module can work on windows was only discovered by accident, that after switching the build of LAMMPS for windows to using CMake. this is done on Linux with a cross-compiler.

Your best option to get this to work on windows would be through installing the Windows subsystem for Linux and downloading or compiling LAMMPS inside the Linux shell.

Axel.

Hello Axel,

i am using Windows 10 pro and Python 3.7.4 installed with anaconda. I will try it with Python 3.9. Otherwise i will try to get this installed through the subsystem for Linux.

This is the Lammps version from October 28th.

Best regards

Betim

Hello Axel,

just to finish this. It is working with Python 3.9

Best regards