mcastorina / graph-cli

Flexible command line tool to create graphs from CSV data
783 stars 29 forks source link

ImportError: cannot import name cbook #48

Closed nodecentral closed 3 years ago

nodecentral commented 3 years ago

Hi

Ok, after installing the latest version graph-cli v0.1.11, and running the ‘ pip install importlib-metadata ’ too, I have a new error for you..

Traceback (most recent call last):
  File "/home/pi/.local/bin/graph", line 10, in <module>
    sys.exit(main.main())
  File "/home/pi/.local/lib/python2.7/site-packages/graph_cli/main.py", line 17, in main
    create_graph(graphs)
  File "/home/pi/.local/lib/python2.7/site-packages/graph_cli/graph.py", line 228, in create_graph
    import matplotlib
  File "/home/pi/.local/lib/python2.7/site-packages/matplotlib/__init__.py", line 129, in <module>
    from . import cbook
ImportError: cannot import name cbook

any ideas ?

mcastorina commented 3 years ago

I've never seen that, but here's a SO post that suggests upgrading / reinstalling matplotlib: https://stackoverflow.com/questions/44623376/importerror-cannot-import-name-cbook

nodecentral commented 3 years ago

Ok, I worked my way through that, and in the end this seems to do the job..

I uninstalled matplotlib via pip

python -m pip uninstall matplotlib

And then did the Install again, but this time without pip

sudo apt-get install python-matplotlib