-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
bz2 mistakenly made a hard requirement of matplotlib 2.2.2 #10866
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
Labels
Release critical
For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
Comments
I am getting this error. I have added matplotlib in requirements.txt and I am installing via pip. I am running my project in python virtualenv. If I am running in system, without activating virtualenv. It's working. Matplotlib version:
Error log: |
@Ravi2712 You have as of now the following options:
|
@ImportanceOfBeingErnest : Installed current development version in virtualenv. It's working. Thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Release critical
For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Bug report
Bug summary
The
_bz2
module is made a dependency in matplotlib 2.2.2. At least up until matplotlib 2.1.1, this was not the case. I believe this is a mistake. Previously, the import ofbz2
(inmatplotlib/cbook/__init__.py
) was made only when needed, inside theto_filehandle()
function. In 2.2.2, this import is moved up to at the top of the file, meaning that it always try to importbz2
and by extension_bz2
, regardless of whether it will be used or not.This is a problem as
_bz2
is not always installed, and not listed as a required dependency of matplotlib. I am able to fix the issue easily by moving the import ofbz2
back down inside of theto_filehandle()
function, or alternatively placing it inside atry
/except
block.Actual outcome
Matplotlib version
I have installed both Python and matplotlib from source.
The text was updated successfully, but these errors were encountered: