It's never a good idea to run pip install without --only-binary. This should be the default that you never change. The current default is a security hazard as well as leads you to the situation you are in with no good way of debugging the problem.
What you could try doing: download the wheel you are trying to install ( likely, this: https://files.pythonhosted.org/packages/b0/6d/3572fe243c74112fef120f0bc86f5edd21f49b60e8322fc7f6a01fe945dd/matplotlib-3.9.2-cp313-cp313-win_amd64.whl#sha256=f32c7410c7f246838a77d6d1eff0c0f87f3cb0e7c4247aebea71a6d5a68cab49 ) and try installing it with "pip install ./matplotlib-3.9.2-cp313-cp313-win_amd64.whl". You will probably get an error, and hopefully, the error message will give you some idea about why it couldn't install this in your initial attempt. On Tue, Sep 2, 2025 at 11:00 PM Rob Cliffe via Python-list <python-list@python.org> wrote: > > Hello, can anyone help? All assistance gratefully received. I am > running python 3.13.3 on a Windows 11 machine and trying to do > pip install matplotlib > (No, I don't need to say "python -m ...", I am running the right version > of python.exe.) > This starts by generating the following output (which I can catch by > redirecting it to a file) > > Collecting matplotlib > Using cached matplotlib-3.10.6.tar.gz (34.8 MB) > Installing build dependencies: started > Installing build dependencies: finished with status 'done' > Getting requirements to build wheel: started > Getting requirements to build wheel: finished with status 'done' > Installing backend dependencies: started > Installing backend dependencies: finished with status 'done' > Preparing metadata (pyproject.toml): started > Preparing metadata (pyproject.toml): finished with status 'error' > > then prints error messages on the screen which are scrolled out too fast > to see, but end as follows: > > 3: note: in expansion of macro 'PYBIND11_COMPAT_STRDUP' > rec_fget->doc = > PYBIND11_COMPAT_STRDUP(rec_fget->doc); > ^~~~~~~~~~~~~~~~~~~~~~ > C:\Users\robcl\AppData\Local\Temp\pip-build-env-1ud913ho\overlay\Lib\site-packages\pybind11\include/pybind11/pybind11.h:248:36: > note: (if you use '-fpermissive', G++ will accept your code, but > allowing the use of an undeclared name is deprecated) > # define PYBIND11_COMPAT_STRDUP strdup > ^~~~~~ > C:\Users\robcl\AppData\Local\Temp\pip-build-env-1ud913ho\overlay\Lib\site-packages\pybind11\include/pybind11/pybind11.h:2379:33: > note: in expansion of macro 'PYBIND11_COMPAT_STRDUP' > rec_fget->doc = > PYBIND11_COMPAT_STRDUP(rec_fget->doc); > ^~~~~~~~~~~~~~~~~~~~~~ > C:\Users\robcl\AppData\Local\Temp\pip-build-env-1ud913ho\overlay\Lib\site-packages\pybind11\include/pybind11/pybind11.h:248:36: > error: there are no arguments to 'strdup' that depend on a template > parameter, so a declaration of 'strdup' must be available [-fpermissive] > # define PYBIND11_COMPAT_STRDUP strdup > ^~~~~~ > C:\Users\robcl\AppData\Local\Temp\pip-build-env-1ud913ho\overlay\Lib\site-packages\pybind11\include/pybind11/pybind11.h:2387:33: > note: in expansion of macro 'PYBIND11_COMPAT_STRDUP' > rec_fset->doc = > PYBIND11_COMPAT_STRDUP(rec_fset->doc); > ^~~~~~~~~~~~~~~~~~~~~~ > In file included from ../src/_backend_agg_basic_types.h:17, > from ../src/_backend_agg.h:41, > from ../src/_backend_agg_wrapper.cpp:6: > ../src/py_adaptors.h: In member function 'void > mpl::PathIterator::set(pybind11::object, pybind11::object, bool, double)': > ../src/py_adaptors.h:96:57: warning: comparison of integer > expressions of different signedness: 'pybind11::ssize_t' {aka 'int'} and > 'unsigned int' [-Wsign-compare] > if (m_codes.ndim() != 1 || m_codes.shape(0) != > m_total_vertices) { > ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ > ../src/_backend_agg_wrapper.cpp: In lambda function: > ../src/_backend_agg_wrapper.cpp:253:37: warning: narrowing > conversion of 'renderer->RendererAgg::get_height()' from 'unsigned int' > to 'int' inside { } [-Wnarrowing] > renderer->get_height(), > ~~~~~~~~~~~~~~~~~~~~^~ > ../src/_backend_agg_wrapper.cpp:253:37: warning: narrowing > conversion of 'renderer->RendererAgg::get_height()' from 'unsigned int' > to 'int' inside { } [-Wnarrowing] > ../src/_backend_agg_wrapper.cpp:254:36: warning: narrowing > conversion of 'renderer->RendererAgg::get_width()' from 'unsigned int' > to 'int' inside { } [-Wnarrowing] > renderer->get_width(), > ~~~~~~~~~~~~~~~~~~~^~ > ../src/_backend_agg_wrapper.cpp:254:36: warning: narrowing > conversion of 'renderer->RendererAgg::get_width()' from 'unsigned int' > to 'int' inside { } [-Wnarrowing] > ../src/_backend_agg_wrapper.cpp:258:39: warning: narrowing > conversion of '(renderer->RendererAgg::get_width() * 4)' from 'unsigned > int' to 'int' inside { } [-Wnarrowing] > renderer->get_width() * 4, > ~~~~~~~~~~~~~~~~~~~~~~^~~ > ../src/_backend_agg_wrapper.cpp:258:39: warning: narrowing > conversion of '(renderer->RendererAgg::get_width() * 4)' from 'unsigned > int' to 'int' inside { } [-Wnarrowing] > ninja: build stopped: subcommand failed. > INFO: autodetecting backend as ninja > INFO: calculating backend command to run: > C:\Users\robcl\AppData\Local\Temp\pip-build-env-1ud913ho\normal\Scripts\ninja.EXE > [end of output] > > note: This error originates from a subprocess, and is likely not a > problem with pip. > error: metadata-generation-failed > > × Encountered error while generating package metadata. > ╰─> See above for output. > > note: This is an issue with the package mentioned above, not pip. > hint: See above for details. > > Best wishes > Rob Cliffe > -- > https://mail.python.org/mailman3//lists/python-list.python.org -- https://mail.python.org/mailman3//lists/python-list.python.org