Cmake --install, python, and the final location of

I’m happily using lammps via the python interface, except for one cumbersome step. I use cmake --install . to install the python package, but it does not seem to copy As a result, I have to add the cmake build path to LD_LIBRARY_PATH, or copy myself to (in my case) ~/.local/lib/python3.9/site-packages/lammps.

Is this the intended behavior, or is there a cleaner way of getting the shared library someplace where the python module can find it?

This is the intended behavior. With “make install” the assumption is that it will be installed into a location which is covered by LD_LIBRARY_PATH or otherwise “known” to the shared linker. It is primarily intended for people creating binary packages or environment modules. The same thing will be needed for the LAMMPS executable and anything else that is linked to the LAMMPS library as well.

If you only want to use the python module, then you should not be using “make install” in the first place, but rather “make install-python”. That will change the installation process to skip the regular executable installation and that of the python module so that the generated wheel file will contain the file and then it will be installed into the corresponding location within the selected site-packages folder.

Thanks, I’ll try that.