Skip to content
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

Conda install triggers known Matplotlib error #205

Closed
rebeccabilbro opened this issue Apr 24, 2017 · 8 comments
Closed

Conda install triggers known Matplotlib error #205

rebeccabilbro opened this issue Apr 24, 2017 · 8 comments
Labels
type: bug something isn't working
Milestone

Comments

@rebeccabilbro
Copy link
Member

@bbengfort @jkeung I was able to successfully install the conda package on a virtual machine that has Anaconda, but I ran into a known matplotlib issue when trying to import the package:

Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  2 2016, 17:53:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yellowbrick as yb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/anaconda3/lib/python3.5/site-packages/yellowbrick/__init__.py", line 29, in <module>
    from .style.rcmod import *
  File "/root/anaconda3/lib/python3.5/site-packages/yellowbrick/style/__init__.py", line 21, in <module>
    from .palettes import *
  File "/root/anaconda3/lib/python3.5/site-packages/yellowbrick/style/palettes.py", line 9, in <module>
    import matplotlib.pyplot as plt
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_qt5agg.py", line 16, in <module>
    from .backend_qt5 import QtCore
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 26, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 56, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/root/anaconda3/lib/python3.5/site-packages/matplotlib/backends/qt_compat.py", line 137, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: No module named 'PyQt4'

Unfortunately, this means that we (yellowbrick developers) can't do much to fix the issue until Anaconda and Matplotlib development synchronizes.

Until then, add a note to quick start docs to communicate to users the two fixes:

  1. Pin PyQT4
  2. Change the matplotlib backend
@rebeccabilbro rebeccabilbro added this to the Backlog milestone Apr 24, 2017
@rebeccabilbro rebeccabilbro added the type: bug something isn't working label Apr 24, 2017
@bbengfort
Copy link
Member

@rebeccabilbro you tried this on a linux machine, right?

@rebeccabilbro
Copy link
Member Author

Yes, Red Hat Linux 4.4.7 virtual machine

@bbengfort
Copy link
Member

From what I can tell (though I'd only bet a donut on this) -- this is a Linux only issue, so one thing we can say is that we prefer installation with pip for OS X and Linux, and conda for Windows.

@bbengfort
Copy link
Member

I've added a note in both the README and the new Quickstart (along with installation instructions for Anaconda) -- so I think that solves this issue. Will close when I push.

@astrojuanlu
Copy link

matplotlib 3.0 has changed the backend selection logic, perhaps someone wants to check if this is still an issue.

@rebeccabilbro
Copy link
Member Author

Hello @Juanlu001 and thanks so much for noting this! I was also noticing some weird things happening after upgrading to matplotlib 3.0; I've submitted a PR, which as a temporary solution, will at least let people know what the mpl requirements are for YB. However, we definitely need to start discussing a comprehensive fix in Yellowbrick. Would you be interested in adding a new issue to our backlog about the updates in mpl 3.0 regarding how the backend is selected, so that we can start discussing the best way to approach the fix? And of course any recommendations would be most welcome!!

@kumar781
Copy link

cant use the library as it is displaying an error" no module named yellowbrick" despite installation through pip or even conda.

@rebeccabilbro
Copy link
Member Author

cant use the library as it is displaying an error" no module named yellowbrick" despite installation through pip or even conda.

Hi again @kumar781 sorry you're having trouble; as noted in my response to you in #860 we would need more information about your installation and set-up to help you. If you continue to experience challenges with your installation, feel free to respond there with the details we requested!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants