El procedimiento para instalar OpenCV para python3 en MAC 10.9.5 es el siguiente:
Normalmente si no se cuenta con Python3 instalado en MAC lo más fácil es:
brew install python3
pip3 install numpy
INSTALANDO OPENCV EN PYTHON3 USANDO CMAKE POR CONSOLA
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3 -D PYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib -D PYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -D PYTHON_NUMPY_INCLUDE_DIRS=/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/numpy/core/include/numpy -D PYTHON_PACKAGES_PATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages ..
make -j8
sudo make install
Debemos agregar a nuestro archivo ~/.bash_profile la variable de entorno PYTHONPATH :
PYTHONPATH=”${PYTHONPATH}:/usr/local/lib/python3.4/site-packages”
export PYTHONPATH
Para visualizar todas las variables de entorno en la terminal de MAC digitamos “env” y damos enter.
Para probar si OpenCV se instalo correctamente en la terminal de MAC digitamos:
“python3″
y posteriormente
“import cv2″
Si no se genera ningún mensaje de error esto quiere decir que todo funciono perfectamente
Si quisieramos eliminar la variable de entorno digitamos
unset PYTHONPATH
Si se necesita desinstalar OpenCV y estando dentro del folder build ejecutamos:
sudo make uninstall
Espero que los anteriores pasos hayan sido de ayuda.
Blog Personal Julián Patiño
Hannah - 9 years ago
One woman raised her hand when she felt full and was led into an MRI machine, where her totally packed stomach was easily seen on the screen. Then, the moment of truth: she looked at a big piece of cake.
Morgan - 9 years ago
Two women volunteers got into their hospital pajamas and ate a several-course French chef cooked meal brought in specially for the purpose.
Sam - 9 years ago
A tough job, no doubt, but someone had to do it – as the narrator so wisely explained, “We can only find out if we have special room for dessert if we’re full.”