r/learnpython • • 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?

3 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/tthkbw 13d ago

Thanks for the input. I have let uv handle this stuff since this project is currently only for my personal use.

As far as Claude goes--I currently don't use AI except to answer very simple questions that I used to look up via DuckDuckGo. I have tried it over the last three years or so for autocomplete in nvim, and also prompting for specific implementations of some functionality. But I have nearly completely stopped using AI for coding. I don't learn anything when I use AI and I feel little satisfaction in doing so even if the result is solving a problem.

However, I understand others' use of it as an efficient tool. But I am 77 and have been retired from chip design and FPGA design days for over 10 years and no one but me evaluates my productivity. Writing code keeps my mind active, is fun and challenging, and allows me to stave off dementia for a little longer.

2

u/seanv507 13d ago

I totally understand where you are coming from. However, no one forces you to use claude for vibe coding. I am suggesting you use it for unblocking you. In particular, ask it to do the grunt work of setting up a python environment, so that you can focus on programming.

Claude is pretty good at best practices. In this case, uv defaults to use whatever python you have on your machine. Claude, xan be expected to identify the strategies to unblock you. It has access to your code, so it can identify alternative ways to fix your issue. Eg as I mentioned, you have two options: downgrade python or upgrade numpy.. Depending on what other packages you import, one may be better than the other. People dont typically provide the full context to their questions, so claude can help as a 'pair programmer' looking over your shoulder, rather than a snarky stack overflow expert that assumes you have an xy problem.