diff --git a/install/from-scratch.sh b/install/from-scratch.sh
index 8d30ec95314aadfd2b453dd301a0e366650af183..2f68850925d0718d02259d740d58e82ebd5915a7 100755
--- a/install/from-scratch.sh
+++ b/install/from-scratch.sh
@@ -29,10 +29,8 @@ else
 fi
 
 if [ "$(uname)" == "Linux" ]; then
-    OPENCV="opencv=3"
     TENSORFLOW=tensorflow
 else
-    OPENCV=
     TENSORFLOW=
 fi
 
@@ -69,7 +67,7 @@ ${CONDA} create --yes -n ${NAME} \
   numexpr=2.6.1 \
   numpy=1.11.1 \
   openblas=0.2.19 \
-  ${OPENCV} \
+  opencv=3 \
   pillow=3.3.1 \
   pip=8.1.2 \
   pkg-config \
@@ -88,6 +86,13 @@ ${CONDA} create --yes -n ${NAME} \
 echo "[>>] Pip-installing extra dependencies in environment ${NAME} for ${PYTHON_VERSION}..."
 source ${BASEDIR}/bin/activate ${NAME}
 
+# pip install tensorflow in mac
+if [ "$(uname)" == "Darwin" ]; then
+  pip install tensorflow
+  # test tensorflow
+  python -c "import tensorflow"
+fi
+
 # Cyvlfeat requires special instructions
 cyvlfeat=git+https://github.com/menpo/cyvlfeat@v0.4.5
 if [ "$(uname)" == "Linux" ]; then