Open zachvalenta opened 5 years ago
I have the same issue with Python 3.8
Here is a trace:
Traceback (most recent call last):
File "/pypi/graph-cli-0.1.17/bin/.graph-wrapped", line 9, in <module>
sys.exit(main.main())
File "/pypi/graph-cli-0.1.17/lib/python3.8/site-packages/graph_cli/main.py", line 17, in main
create_graph(graphs)
File "/pypi/graph-cli-0.1.17/lib/python3.8/site-packages/graph_cli/graph.py", line 241, in create_graph
import matplotlib.pyplot as plt
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2500, in <module>
switch_backend(rcParams["backend"])
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/pyplot.py", line 277, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/pyplot.py", line 278, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "/pyti/python3-3.8.11/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/backends/backend_qt5agg.py", line 11, in <module>
from .backend_qt5 import (
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/backends/backend_qt5.py", line 13, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 11, in <module>
from matplotlib.backends.qt_compat import QtGui
File "/pypi/python3.8-matplotlib-3.4.2/lib/python3.8/site-packages/matplotlib/backends/qt_compat.py", line 179, in <module>
raise ImportError("Failed to import any qt binding")
ImportError: Failed to import any qt binding
I'm looking into how to resolve this. Have you tried installing PyQt5
?
@mcastorina: when I add PyQt5
I get:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aborted (core dumped)
I fell into this as well XD I suspect that M1 Mac users will see this (at least more often): https://stackoverflow.com/questions/70936664/metadata-generation-failed-while-installing-pyqt5
Apparently for that architecture you just need to hide your pyqt5 behind the building magic of homebrew, which takes care of Python 3 issues with the M1 architecture.
So install python3 with brew and then run:
brew install pyqt5
Probably this has nothing to do with @mcastorina great work :)
Seems like the same phenomenon as #22.