Commit 90dfb0b
committed
Try/except import of Axes3D
On some installs, the `mpl_toolkits` namespace package gets an old
version which uses deprecated (And removed) code from the main library.
On such the import of Axes3D will error with an `ImportError`.
This prevents users from using any of `matplotlib`, since it is imported
unconditionally by default.
This just try/excepts the imports (and adjusts the registration code
accordingly) to allow users to continue using matplotlib (though not 3D
and possibly not other mpl_toolkits) even with older installs occluding
the mpl_toolkits.1 parent fcd5bb1 commit 90dfb0b
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
91 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
0 commit comments