Skip to content

Commit e5f5822

Browse files
authored
Merge pull request #249 from JuliaPy/tk/tryboth
try both PyQt4 and PyQt5
2 parents 1290142 + 2b14cc9 commit e5f5822

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/PyPlot.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ function find_backend(matplotlib::PyObject)
134134
if defaultgui == :qt_pyside
135135
pyimport_conda("PySide", "pyside")
136136
else
137-
pyimport_conda("PyQt4", "pyqt")
137+
try
138+
pyimport_conda("PyQt5", "pyqt")
139+
catch
140+
pyimport("PyQt4")
141+
end
138142
end
139143
elseif defaultgui == :wx
140144
pyimport_conda("wx", "wxpython")

0 commit comments

Comments
 (0)