diff --git a/setup.py b/setup.py
index 5a2f099f4af082cae2aadbc555f9edbe363e731e..b1a78ea79104622871b91d48eff905d0e133fd56 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@ class PostInstallCommand(install):
 
                 print("...found!")
                 return
-            except:
+            except ImportError:
                 "No PyDetLib installation found, attempting to install"
                 check_call(
                     "karabo -g https://in.xfel.eu/gitlab install pyDetLib master".split()