Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: document the issues with overlaying new mpl on old mpl#29673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

tacaswell
Copy link
Member

closes#26827

@story645
Copy link
Member

Can this maybe get added to the FAQ since it's relatively common?
Maybehttps://matplotlib.org/devdocs/users/faq.html or

of a version of Matplotlib < 3.8 (e.g. via ``pip install --local`` or
``python -m venv --system-site-packages ...``) will fail because the old
`matplotlib.mpl_toolkits` files will be found where as the newer files will be
found for all other modules. This will result in errors due to the version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is there anything we can do about this? eg somehow clean out the old files on pip install, I guess by overwriting them with empty files?

Or barring that, it would be helpful if we suggested to users whatthey should do about this. I'm not even surepip uninstall matplotlib will clean the mpl_toolkits files out.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The issue is the "overlaying". If the old version of Matplotlib is in the venv (and hence the users has write) then pip takes care of itself, but if you are exposed to a read-only set of files then there is nothing we can do.

Even if there was something to do, it would be pip's job not ours.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is still a bit mysterious, and I don't think I am in a low percentile of our user's sophistication in installing python packages, so can we be more clear? Is this primarily happening when the operating system has packaged matplotlib as part of the distribution (or apt-install etc), and then the user's pip-install doesn't replace mpl-toolkits in the distribution's version of Matplotlib? If that is the most common case, can we just say something like that, while leaving open the possibility that the installation got crossed other ways.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is this primarily happening when the operating system has packaged matplotlib as part of the distribution (or apt-install etc), and then the user's pip-install doesn't replace mpl-toolkits in the distribution's version of Matplotlib?

Yes, that is the common (and likely only?) case.

jklymak reacted with thumbs up emoji
Co-authored-by: Jody Klymak <jklymak@gmail.com>
Comment on lines 183 to 185
As a consequence using ``pip`` to install a version of Matplotlib >= 3.8 on top
of a version of Matplotlib < 3.8 (e.g. via ``pip install --local`` or
``python -m venv --system-site-packages ...``) will fail because the old
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Maybe:

Suggested change
As a consequence using ``pip`` to install a version of Matplotlib >= 3.8 on top
of a version of Matplotlib < 3.8 (e.g. via ``pip install --local`` or
``python -m venv --system-site-packages ...``) will fail because the old
As a consequence using ``pip`` to install a version of Matplotlib >= 3.8 on top
of a version of Matplotlib < 3.8 (e.g. installed using a system package manager
like ``apt install ...``, or via ``pip install --local`` or
``python -m venv --system-site-packages ...``) will fail because the old

where as -> whereasmiss-match -> mismatchThanks to@Mecanerd for these suggestionsCo-authored-by: Mecanerd <joshdonath23@hotmail.com>
Copy link
Member

@ksundenksunden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd tend to agree with some of the review comments that this could be made even more clear, but having it is better than not having it, so going to move forward with what we have. I'd happily consider a reword on this submitted later.

@ksundenksunden merged commitcfe41d4 intomatplotlib:mainMay 2, 2025
22 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMay 2, 2025
rcomer added a commit that referenced this pull requestMay 2, 2025
…673-on-v3.10.xBackport PR#29673 on branch v3.10.x (DOC: document the issues with overlaying new mpl on old mpl)
@ksundenksunden mentioned this pull requestMay 9, 2025
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@jklymakjklymakjklymak left review comments

@MecanerdMecanerdMecanerd left review comments

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Labels
Documentation: APIfiles in lib/ and doc/api
Projects
None yet
Milestone
v3.10.3
Development

Successfully merging this pull request may close these issues.

[Bug]: ImportError when using Matplotlib v3.8.0 in Python package tests
6 participants
@tacaswell@story645@QuLogic@jklymak@ksunden@Mecanerd

[8]ページ先頭

©2009-2025 Movatter.jp