File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -170,10 +170,21 @@ end
170
170
function __init__ ()
171
171
global const isjulia_display = Bool[isdisplayok ()]
172
172
copy! (matplotlib, pyimport_conda (" matplotlib" , " matplotlib" ))
173
+ mvers = matplotlib[:__version__ ]
173
174
global const version = try
174
- convert (VersionNumber, matplotlib[ :__version__ ] )
175
+ convert (VersionNumber, mvers )
175
176
catch
176
- v " 0.0" # fallback
177
+ parts = split (mvers,' .' )
178
+ try
179
+ # handle mvers == aa.bb.cc.xx by dropping .xx, see #448
180
+ convert (VersionNumber, join (parts[1 : min (3 ,length (parts))], ' .' ))
181
+ catch
182
+ if ! isempty (parts) && all (isdigit, parts[1 ])
183
+ convert (VersionNumber, parts[1 ])
184
+ else
185
+ v " 0.0" # fallback
186
+ end
187
+ end
177
188
end
178
189
179
190
backend_gui = find_backend (matplotlib)
You can’t perform that action at this time.
0 commit comments