You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tips for installing ALM (Python interface) with uv instead of conda ? #335
I’m trying to set up ALAMODE’s Python interface (ALM) in a project managed with uv rather than conda. The installation consistently fails at the compilation step. Is there a recommended way to install ALM in a uv-managed environment?
Root cause (as far as I can tell): ALM needs to compile C++ code internally against Eigen and other linear algebra libraries. In a conda environment, these dependencies (the compiler toolchain, Eigen headers, etc.) are provided by conda packages, so the build works. uv only manages Python packages from PyPI and does not provide these non-Python build dependencies, so a straightforward uv install reaches the compilation step and always fails there.
Can you provide some ideas how to resolve this issues or any plan to extend ALAMODE so it can be incorporating with uv?
Hi @ttadano and the ALAMODE team, congrats on the 2.0.0 release, and thanks a lot for the new Python package!
Being able to build alm (and the experimental anphon) with pip install ./python makes things much easier than before..
Following up on this issue, I was wondering if you might consider putting the alamode package on PyPI at some point, ideally with prebuilt wheels?
Right now, a uv or pip install still builds the C++ code locally (a C++17 compiler with OpenMP, plus Eigen, Boost, HDF5, spglib and LAPACK, and MPI for anphon), so wheels would make it a one-line install for most users.
It would also help us a lot in atomate2 --> PyPI packages can only depend on other PyPI packages, so with wheels we could use alm for the force constant fits and anphon for the SCPH, i.e., renormalized phonons without MD (we are discussing this in materialsproject/atomate2#1634).
I know anphon needs MPI, which makes wheels tricky.. so even an alm-only wheel to start with would already be great.
If it helps, I would be happy to contribute to this, e.g. setting up the wheel builds (cibuildwheel on GitHub Actions) and the PyPI upload in a PR...
Thank you @hrushikesh-s for the suggestion of PyPI packages of alm and anphon. Yes, that is on my to-do list, and my plan was to update the existing conda package first and then work on PyPI.
If you can help us on the PyPI port, that would be very helpful.
@ttadano, thanks a lot! Happy to help with this.. Here is what I have in mind, but please change anything you would prefer to be done differently:
build wheels on my fork with cibuildwheel for Linux and macOS (the same platforms as the conda package), with the C/C++ libraries linked in, so pip install alamode works without a compiler or conda
keep the same MPI support as the conda package, so anphon is built with Open MPI, and pip install alamode[openmpi] gets Open MPI from PyPI (similar to how mpi4py and the LAMMPS wheels get MPI from PyPI)
if it works out, also add an MPICH build, so anphon can use the system MPI on HPC machines (Cray MPICH, Intel MPI, etc.)
open a PR here only once the wheels pass your existing tests, and I am happy to look after the wheel builds on future releases (in case the GitHub Actions build fails..)
Activity
hrushikesh-s commentedon Oct 29, 2026
Hi @ttadano and the ALAMODE team, congrats on the 2.0.0 release, and thanks a lot for the new Python package!
Being able to build
alm(and the experimentalanphon) withpip install ./pythonmakes things much easier than before..Following up on this issue, I was wondering if you might consider putting the
alamodepackage on PyPI at some point, ideally with prebuilt wheels?Right now, a uv or pip install still builds the C++ code locally (a C++17 compiler with OpenMP, plus Eigen, Boost, HDF5, spglib and LAPACK, and MPI for
anphon), so wheels would make it a one-line install for most users.It would also help us a lot in atomate2 --> PyPI packages can only depend on other PyPI packages, so with wheels we could use
almfor the force constant fits andanphonfor the SCPH, i.e., renormalized phonons without MD (we are discussing this in materialsproject/atomate2#1634).I know
anphonneeds MPI, which makes wheels tricky.. so even analm-only wheel to start with would already be great.If it helps, I would be happy to contribute to this, e.g. setting up the wheel builds (cibuildwheel on GitHub Actions) and the PyPI upload in a PR...
cc @JaGeo @leslie-zheng for reference..
ttadano commentedon Oct 30, 2026
Thank you @hrushikesh-s for the suggestion of PyPI packages of alm and anphon. Yes, that is on my to-do list, and my plan was to update the existing conda package first and then work on PyPI.
If you can help us on the PyPI port, that would be very helpful.
hrushikesh-s commentedon Oct 30, 2026
@ttadano, thanks a lot! Happy to help with this.. Here is what I have in mind, but please change anything you would prefer to be done differently:
pip install alamodeworks without a compiler or condaanphonis built with Open MPI, andpip install alamode[openmpi]gets Open MPI from PyPI (similar to how mpi4py and the LAMMPS wheels get MPI from PyPI)anphoncan use the system MPI on HPC machines (Cray MPICH, Intel MPI, etc.)hrushikesh-s commentedon Nov 16, 2026
@ttadano, now that alamode has been released through pypi, I think we can close this issue as well. Thanks!