diff --git a/install/from-scratch.sh b/install/from-scratch.sh
index af222d7a8b2ad62bf20147c65fa48cb92f7ed887..8d30ec95314aadfd2b453dd301a0e366650af183 100755
--- a/install/from-scratch.sh
+++ b/install/from-scratch.sh
@@ -28,6 +28,14 @@ else
     CAFFE=
 fi
 
+if [ "$(uname)" == "Linux" ]; then
+    OPENCV="opencv=3"
+    TENSORFLOW=tensorflow
+else
+    OPENCV=
+    TENSORFLOW=
+fi
+
 # For a complete list of dependencies, please read:
 # https://gitlab.idiap.ch/bob/bob/wikis/Dependencies
 echo "[>>] Creating environment ${NAME} for python ${PYTHON_VERSION} with bob dependencies..."
@@ -61,7 +69,7 @@ ${CONDA} create --yes -n ${NAME} \
   numexpr=2.6.1 \
   numpy=1.11.1 \
   openblas=0.2.19 \
-  opencv=3 \
+  ${OPENCV} \
   pillow=3.3.1 \
   pip=8.1.2 \
   pkg-config \
@@ -73,7 +81,7 @@ ${CONDA} create --yes -n ${NAME} \
   sphinx=1.4.6 \
   sphinx_rtd_theme \
   sqlalchemy=1.0.13 \
-  tensorflow \
+  ${TENSORFLOW} \
   virtualenv \
   vlfeat=0.9.20