Added an error message for the case, where the initial import of PyQt5 fails.

Sat, 19 Jul 2014 15:24:47 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 19 Jul 2014 15:24:47 +0200
changeset 3708
4fbb91fb6a31
parent 3705
a88eb398a4ed
child 3709
191ccdf78966

Added an error message for the case, where the initial import of PyQt5 fails.

eric6.py file | annotate | diff | comparison | revisions
--- a/eric6.py	Sat Jul 19 13:56:43 2014 +0200
+++ b/eric6.py	Sat Jul 19 15:24:47 2014 +0200
@@ -33,7 +33,18 @@
 import time
 import logging
 
-from PyQt5.QtCore import qWarning, QLibraryInfo, QTimer, QCoreApplication
+try:
+    from PyQt5.QtCore import qWarning, QLibraryInfo, QTimer, QCoreApplication
+except ImportError:
+    try:
+        from tkinter import messagebox
+        messagebox.showerror(
+            "eric6 Error",
+            "PyQt5 could not be imported. Please make sure"
+            " it is installed and accessible.")
+    except ImportError:
+        pass
+    sys.exit(100)
 
 # some global variables needed to start the application
 args = None

eric ide

mercurial