We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 693895e commit 2476177Copy full SHA for 2476177
1 file changed
src/init.jl
@@ -170,10 +170,21 @@ end
170
function __init__()
171
global const isjulia_display = Bool[isdisplayok()]
172
copy!(matplotlib, pyimport_conda("matplotlib", "matplotlib"))
173
+ mvers = matplotlib[:__version__]
174
global const version = try
- convert(VersionNumber, matplotlib[:__version__])
175
+ convert(VersionNumber, mvers)
176
catch
- 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
188
end
189
190
backend_gui = find_backend(matplotlib)
0 commit comments