diff --git a/.travis.yml b/.travis.yml
index b7a9353f5d9ff7ba602d4a19db00dcfe29212652..0c72656097421207eda7102f033c1cb2626f499a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,7 @@ before_install:
 - if [ -n "${NUMPYSPEC}" ]; then sudo apt-get install -qq --force-yes libatlas-dev libatlas-base-dev liblapack-dev gfortran; fi
 - if [ -n "${NUMPYSPEC}" ]; then pip install --upgrade pip setuptools; fi
 - if [ -n "${NUMPYSPEC}" ]; then pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel numpy$NUMPYSPEC; fi
-- pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel matplotlib==1.3.0 sphinx nose==1.3.0 jinja2==2.6 cpp-coveralls pygments==1.6 setuptools==7.0
+- pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel matplotlib==1.3.0 sphinx nose==1.3.0 jinja2==2.6 cpp-coveralls pygments==1.6 setuptools==8.0
 install:
 - python bootstrap.py
 - CFLAGS=-coverage ./bin/buildout
diff --git a/setup.py b/setup.py
index 995b4d04c47acc48bfb28e7fb57d83508d1411a3..10b95c89fd05eae97a55f0b030e00cf59ab9b8ff 100644
--- a/setup.py
+++ b/setup.py
@@ -18,9 +18,18 @@ build_requires = load_requirements()
 # Define package version
 version = open("version.txt").read().rstrip()
 
-packages = ['boost', 'opencv>=2.0']
+packages = ['boost']
 boost_modules = ['system']
 
+# check if opencv is available
+try:
+  from bob.extension import check_packages
+  pkg = check_packages(['opencv>=2.0'])
+  print("Found OpenCV libraries %s" % pkg[0].libraries())
+  packages.append('opencv>=2.0')
+except RuntimeError as e:
+  print("OpenCV was not found, it will not be availabe during tests")
+
 setup(
 
     name="bob.ip.flandmark",