Re: Error installing matplotlib

Mats Wichmann <[email protected]>
Newsgroups gmane.comp.python.general
Message-ID <[email protected]>
On 9/3/25 07:20, Rob Cliffe wrote:
> 
> 
> On 03/09/2025 00:01, Mats Wichmann wrote:
>> On 9/2/25 14:51, Rob Cliffe via Python-list wrote:
>>>
>> There are two roots here:
>>
>> (1) it's not finding a prebuilt wheel.  You can see that because it's 
>> proposing to use the source distribution instead:
>>
>> > Collecting matplotlib
>> >    Using cached matplotlib-3.10.6.tar.gz (34.8 MB)
>>
>> and so it, in the initial output.
> I may be wrong, but I suspect that this is because I have attempted to 
> do the install multiple times.  I.e. it didn't say this on the first run.
>>
>> (2) Although at this point all hope of success is often lost on 
>> Windows, it's still going to try to compile things. It found gcc - 
>> there are messages from g++ in the output. Last I know, Pybind11 only 
>> builds with the Microsoft compiler because it uses msvc-specific types 
>> which gcc does not know about.
>>
>> Since the matplotlib project definition provides wheels for Python 
>> 3.13 on Windows (not just the main Python, but also the free-threaded 
>> versions), you need to figure out why the resolver doesn't think 
>> there's anything applicable available.
>>
>>
> Thanks for your reply, Mats, but I'm still lost.
> Best wishes
> Rob Cliffe


I can't tell you specifically how to diagnose why it's not finding what 
you hope it would find.  You might try these things:

# remove cached entries so you're resolving all from PyPI
pip cache purge

# do a test install with some flags that *might* give you useful info:
pip -v install --dry-run --only-binary :all: --ignore-installed matplotlib

It would take people with more pip experience to dig deeper.

I think the alternate manager "uv" may have more targeted debug control 
for this scenario, but I don't promise, haven't used it that much.

I'm sure somebody will pop up with comments if this is bad advice - I 
tried to answer the question of what's happening but not sure how to fix it.
-- 
https://mail.python.org/mailman3//lists/python-list.python.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.