-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: document the issues with overlaying new mpl on old mpl #29673
Conversation
Can this maybe get added to the FAQ since it's relatively common? |
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 |
There was a problem hiding this comment.
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 what they should do about this. I'm not even sure pip uninstall matplotlib
will clean the mpl_toolkits files out.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-authored-by: Jody Klymak <jklymak@gmail.com>
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe:
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 -> whereas miss-match -> mismatch Thanks to @Mecanerd for these suggestions Co-authored-by: Mecanerd <joshdonath23@hotmail.com>
There was a problem hiding this 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.
…g new mpl on old mpl
…673-on-v3.10.x Backport PR #29673 on branch v3.10.x (DOC: document the issues with overlaying new mpl on old mpl)
closes #26827