Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 2.92 KB

MAC.md

File metadata and controls

85 lines (56 loc) · 2.92 KB

Dependencies to run from source on Mac

Python 2.7

  • Use the pre-installed Python.

Numpy

  • Use the pre-installed Numpy.

OpenCV

  • http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.11/opencv-2.4.11.zip

  • If you're aiming to build a standalone EliteOCR application, apply the following patch:

      diff -ur opencv-2.4.11-orig/CMakeLists.txt opencv-2.4.11/CMakeLists.txt
      --- opencv-2.4.11-orig/CMakeLists.txt	2015-02-25 03:10:30.000000000 +0000
      +++ opencv-2.4.11/CMakeLists.txt	2015-05-16 14:16:55.000000000 +0100
      @@ -339,8 +339,7 @@
         endif()
       endif()
       
      -set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}")
      -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
      +set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH})
       
       if(INSTALL_TO_MANGLED_PATHS)
         set(OPENCV_INCLUDE_INSTALL_PATH ${OPENCV_INCLUDE_INSTALL_PATH}/opencv-${OPENCV_VERSION})
      diff -ur opencv-2.4.11-orig/cmake/OpenCVModule.cmake opencv-2.4.11/cmake/OpenCVModule.cmake
      --- opencv-2.4.11-orig/cmake/OpenCVModule.cmake	2015-02-25 03:10:30.000000000 +0000
      +++ opencv-2.4.11/cmake/OpenCVModule.cmake	2015-05-16 13:32:52.000000000 +0100
      @@ -589,7 +589,6 @@
           ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
           LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
           RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
      -    INSTALL_NAME_DIR lib
         )
       
         # For dynamic link numbering convenions
    
  • Build a minimal configuration with:

      cmake . -DBUILD_ZLIB=OFF -DWITH_CUDA=OFF -DWITH_FFMPEG=OFF -DWITH_GSTREAMER=OFF -DWITH_JASPER=OFF -DWITH_JPEG=OFF -DWITH_OPENEXR=OFF -DWITH_PNG=OFF -DWITH_TIFF=OFF -DPYTHON_PACKAGES_PATH=/Library/Python/2.7/site-packages
      make install
    

Qt4

SIP

PyQt4

http://www.riverbankcomputing.co.uk/software/pyqt/download

  • Download the "MacOS/X" source package and build with:

      python ./configure.py -b /usr/local/bin
      make install
    

Other dependencies

pip install qimage2ndarray openpyxl ezodf lxml python-Levenshtein pytz tzlocal requests grequests bitarray BeautifulSoup4

Running from source

Run EliteOCR.py

To create a standalone application