Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
When using Anaconda, but installing matplotlib from source, using the tkagg backend can result in a segfault or sometimes just simply an exception with no figure shown. After some investigation, the root cause was that the build of _tkagg.so was being built and linked against the system's Tk/Tcl libraries and headers. However, when backend_tkagg.py imports Tkinter, it is importing Anaconda's build of the library, which conflicts with the compiled _tkagg.so, leading to errors.
It appears that the matplotlib conda recipe works around this issue by brute-forcing a replacement of every instance of "/usr/local/" with the Anaconda's prefix location in the setupext.py. I think we can do better than that, and make available a proper set of command-line options for various prefixes and such. And of course, to be uniform with the application of --prefix throughout setupext.py.