r/learnpython • u/tthkbw • 13d 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
Show parent comment
3
u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 13d ago
Frankly, lazy imports don't have a major impact on startup time outside of exceptional cases (mostly if importing a huge package, but the execution path only needs it under specific circumstances, and usually doesn't).
I haven't heard much discussion on this yet, but personally I think they're most convenient for things like type annotations and for resolving certain cases where import order is significant (one specific example I've run into at work is the
ftd2xxlibrary, where I think something needed to be imported and initialised before importing that, probably some kind of models).3.14 is still perfectly fine to use. I'd personally default to that unless all of your dependencies already support 3.15. In your project, they seemingly do, in some others that may not be the case.