question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12

See original GitHub issue

This is another potential issue when in macOS that can be handled changing matplotlib settings in ~/.matplotlib/matplotlibrc: with

backend : MacOSX

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
loretoparisicommented, Nov 16, 2018

@f90 by the way there is another trick!!! You can even define your local matplotlibrc. I have just realized this (I was not aware this from the docs actually), because if you run Jupyter, and this is normally outside virtualenv, you need MacOSX backend 👯‍♂️

ip-192-168-22-127:Notebooks loretoparisi$ python --version
Python 2.7.15
ip-192-168-22-127:Notebooks loretoparisi$ cat ~/.matplotlib/matplotlibrc:
cat: /Users/loretoparisi/.matplotlib/matplotlibrc:: No such file or directory
ip-192-168-22-127:Notebooks loretoparisi$ cat ~/.matplotlib/matplotlibrc
backend : TkAgg
ip-192-168-22-127:Notebooks loretoparisi$ ls
README.md       data            hello.py        pandas.py       pima.py         simple.py
ip-192-168-22-127:Notebooks loretoparisi$ touch matplotlibrc
ip-192-168-22-127:Notebooks loretoparisi$ echo "backend : MacOSX" >> matplotlibrc
ip-192-168-22-127:Notebooks loretoparisi$

So I run in VSCode Juypyter but I had to overwrite locally this file 🗡 just commited this change!

schermata 2018-11-16 alle 10 36 03
1reaction
f90commented, Nov 15, 2018

Thanks… Thats’ awkward, so I will link to this info from the README for future people to avoid confusion

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - wxPython import error - Stack Overflow
When trying to use matlablib, it always complains "Matplotlib backend_wx and backend_wxagg require wxPython >=2.8".Pretty sure that I'm using wxPython 2.8.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found