编辑:好的,我已经更概括了这个问题,希望我能得到答案。最后,我关心的只是以某种方式将 openCV 安装到 Mac 计算机上的 Enthought python 发行版中。任何帮助将不胜感激,脚本并不超出我的能力,但我对计算机编程的理解不足,无法弄清楚这些参数的含义以及与 Linux 与 mac 的不同之处。
提示:我一直遵循本网站上的指南,但它适用于 Linux,95% 的“make”命令失败:http: //pyetc.wordpress.com/2013/01/09/installing-the- enthought-python-distribution-with-opencv/
export EPDPATH=$HOME/.local/epd-7.3-2-rh5-x86_64
# prepend the EPD bin dir to your path to make your shell prefer the EPD python interpreter to the system python interpreter
export PATH=$EPDPATH/bin:$PATH
# also the python packages should be searched in the correct location
export PYTHONPATH=$EPDPATH/lib/python2.7/site-packages
其次是:
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX:PATH=$HOME/.local -D PYTHON_EXECUTABLE:FILEPATH=$EPDPATH/bin/python -D PYTHON_INCLUDE_DIR:PATH=$EPDPATH/include/python2.7 -D PYTHON_LIBRARY:FILEPATH=$EPDPATH/lib/libpython2.7.so -D PYTHON_LIBRARY_PATH:UNINITIALIZED=$EPDPATH/lib/libpython2.7.so -D PYTHON_NUMPY_INCLUDE_DIR:PATH=$EPDPATH/lib/python2.7/site-packages/numpy/core/include -D PYTHON_PACKAGES_PATH:PATH=$EPDPATH/lib/python2.7/site-packages -D SPHINX_BUILD:FILEPATH=$EPDPATH/bin/sphinx-build -D PYTHONINTERP_FOUND=1 -D BUILD_PYTHON_SUPPORT=ON -D INSTALL_PYTHON_EXAMPLES:BOOL=ON ..
make
make install