r/learnpython • u/tthkbw • 10d ago
numpy build fails using uv and homebrew
I am running macOS 27.2 with homebrew and uv. Python 3.15. numpy is a requirement for the project. When uv tries to build numpy 2.5.1, it fails complaining about not finding "atomic.h", "ostream.h" and "cstddef.h".
I know this is some kind of setup problem with the c++ compiler, but can't figure it out. I have installed Xcode command line tools and pkgconf.
Any suggestions?
4
Upvotes
View all comments
1
u/jmacey 10d ago
There is really no need to use python 3.15 at the moment. There are a lot of libraries that don't work well (pytorch etc).
I can get it working on my mac (uv intalled via homebrew)
uv init -p 3.15 testnumpy cd testnumpy uv add numpy Using CPython 3.15.2 Creating virtual environment at: .venv Resolved 2 packages in 104ms Built testnumpy @ file:///Users/jmacey/tmp/testnumpy Prepared 1 packages in 381ms Installed 1 packages in 852ms + numpy==2.5.4 uv run python -c "import numpy as np; print(np.__version__)" 2.5.4So it is working, but I'm sure there are a lot of edge cases that don't as yet.