r/learnpython • u/HiddenReader2020 • Oct 13 '26
Going through Automate the Boring Stuff with Python, and can't download the packages
Hi, so after stopping in *FEBRUARY* of this year, I finally got around to actually resuming my learning process today. However, in chapter 9, I have to download the Humre module, and so I need to download the packages. However, I always get the following error:
Failed to build 'matplotlib' when installing build dependencies for matplotlibI even tried using a python3 variant of the command, but no dice. Right now, I'm kind of stuck and searching online hasn't helped me out much.
For your information, I'm on Windows 10. My current Python version is 3.14 (I know there's a slightly more updated version, but I don't think that's the problem), and my pip version 26.1.1 (again, there's a newer version, but I don't think that's the problem).
Thanks in advance.
2
u/bra1n_gym Oct 13 '26
I used python 3.13.7 at work. Most of the data science packages will not install on python 3.14
1
u/jmacey Oct 14 '26
matplot lib is working fine with python 3.14 (alone with full pytorch, pandas, polars etc) for me. I use uv to install everything including python I would suggest trying it as it helps to fix most of the dependancies for you.
1
1
u/klmsa Oct 14 '26
Probably more of an issue with your employer's firewall than the libraries, pip, or python install. That's super common.
1
u/bra1n_gym Oct 14 '26
I know the proxy so that wasn't the issue.
1
u/klmsa Oct 18 '26
My proxy doesn't let all traffic through for us. We have an internal mirror specifically for python packages which redirects all proxy calls. If you're sure, then it's likely something related to your compiler.
2
u/jmacey Oct 14 '26
I would suggest using https://docs.astral.sh/uv/ uv to install and manage all your python things as it will make it easier. Once installed use.
uv init -p 3.14 TestMatplot
cd TestMatplot
uv add matplotlib
uv run python -c "import matplotlib;print(matplotlib.__version__)"which should print out 3.11.2 after that use the .venv (or if you use and ide it should pick it up). and you will have everything you need. If you need other libraries just add to the same project using uv add
6
u/Asly97 Oct 13 '26
You probably don't need matplotlib at all for chapter 9. Humre is a small pure Python package with no dependencies, so you can install just that:
The error comes from whatever bigger install you're running pulling in a matplotlib version that has no prebuilt wheel for Python 3.14. When pip can't find a wheel it falls back to compiling matplotlib from source, which needs a C/C++ compiler on Windows. That's the "failed to build ... build dependencies" part.
So two ways out:
Install each module only when the chapter needs it. Current versions of most of them already ship wheels for 3.14.
If you want the exact versions the book uses, install Python 3.13 alongside 3.14 and do the book's installs inside a venv made with it.
For option 2 it looks like this:
Also worth getting in the habit of
python -m pipinstead of plainpipon Windows. It guarantees the package goes into the same Python you actually run your scripts with, which avoids a lot of "I installed it but it says module not found" confusion later.