Python not getting linked to the shared library

I am currently using the 4 Feb 2024 version of LAMMPS in my university’s HPC. I am trying to build through CMAKE. The problem is CMAKE is not creating lammps module in python’s site_packages folder. So I am not able to import lammps in python. I found out that this should happen during the ‘make install’ command. So when I checked my CMakeCache.txt file, I found out that there has been a series of failure concerning finding python modules (if I am not wrong)

//CMAKE_INSTALL_PREFIX during last run
_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=/users/username/.local
//Compiler reason failure
_Python3_Compiler_REASON_FAILURE:INTERNAL=
//Development reason failure
_Python3_Development_REASON_FAILURE:INTERNAL=
_Python3_EXECUTABLE:INTERNAL=/opt/compiler/python/3.12.1/bin/python3.12
//Python3 Properties
_Python3_INTERPRETER_PROPERTIES:INTERNAL=Python;3;12;1;64;;cpython-312-x86_64-linux-gnu;/opt/compiler/python/3.12.1/lib/python3.12;/opt/compiler/python/3.12.1/lib/python3.12;/opt/compiler/python/3.12.1/lib/python3.12/site-packages;/opt/compiler/python/3.12.1/lib/python3.12/site-packages
_Python3_INTERPRETER_SIGNATURE:INTERNAL=5c3800dfa1d241b6d037eb008b9f31fa
//Interpreter reason failure
_Python3_Interpreter_REASON_FAILURE:INTERNAL=
//NumPy reason failure
_Python3_NumPy_REASON_FAILURE:INTERNAL=
//Compiler reason failure
_Python_Compiler_REASON_FAILURE:INTERNAL=
_Python_DEVELOPMENT_EMBED_SIGNATURE:INTERNAL=1baeaf624734a48f0c309a71b283f8e0
_Python_DEVELOPMENT_MODULE_SIGNATURE:INTERNAL=32cd113c8e33e7430116dae1cf3e06fd
//Development reason failure
_Python_Development_REASON_FAILURE:INTERNAL=
_Python_EXECUTABLE:INTERNAL=/opt/compiler/python/3.12.1/bin/python3.12
//Path to a file.
_Python_INCLUDE_DIR:INTERNAL=/opt/compiler/python/3.12.1/include/python3.12
//Python Properties
_Python_INTERPRETER_PROPERTIES:INTERNAL=Python;3;12;1;64;;cpython-312-x86_64-linux-gnu;/opt/compiler/python/3.12.1/lib/python3.12;/opt/compiler/python/3.12.1/lib/python3.12;/opt/compiler/python/3.12.1/lib/python3.12/site-packages;/opt/compiler/python/3.12.1/lib/python3.12/site-packages
_Python_INTERPRETER_SIGNATURE:INTERNAL=5c3800dfa1d241b6d037eb008b9f31fa
//Interpreter reason failure
_Python_Interpreter_REASON_FAILURE:INTERNAL=
//Path to a library.
_Python_LIBRARY_RELEASE:INTERNAL=/opt/compiler/python/3.12.1/lib/libpython3.12.so
//NumPy reason failure
_Python_NumPy_REASON_FAILURE:INTERNAL=
__pkg_config_checked_PC_FFTW3:INTERNAL=1

My LAMMPS shared library is in my .local/lib64/ folder. My site-packages folder is in /users/username/.local/lib/python3.12/site-packages. But CMAKE uses the directory where my HPC has installed the global modules (/opt/compiler/python/3.12.1/).

Is this the reason there is an issue? How can I make sure that LAMMPS uses my site-packages folder instead?

Where does it say that?

To install the python module you should do “make install-python”

Sorry! I was trying to follow this tutorial → Virtual LAMMPS Workshop and Symposium - August 10-13, 2021

But I now believe this could be outdated. Thank you for the help!