Skip to content
Stefan Weil edited this page May 9, 2020 · 6 revisions

Using OCR-D on macOS

OCR-D can be used on macOS. It requires additional software which is provided for example by Homebrew.

Preconditions

The installation was tested on the latest version of macOS Catalina. It requires lots of free disk space (more than 10 GiB).

Running OCR-D tools on macOS

Install Xcode and Homebrew first.

Installation of Homebrew and required software packages

tbd.

Installation of XCode

tbd.

Installation of OCR-D tools

The installation uses OCR-D/ocrd_all and is similar to the installation on a native Linux distribution. Start with these commands from the shell:

mkdir -p $HOME/src/github/OCR-D
cd $HOME/src/github/OCR-D

# Get OCRD/ocrd_all.
git clone https://github.com/OCR-D/ocrd_all.git

cd $HOME/src/github/OCR-D/ocrd_all

# Build the OCR-D tools. This takes some time.
make all PKG_CONFIG_PATH=/usr/local/Cellar/icu4c/66.1/lib/pkgconfig:/usr/local/Cellar/libarchive/3.4.2_1/lib/pkgconfig

Each command should work without showing an error message. Activate the virtual Python environment with all OCR-D tools:

source $HOME/src/github/OCR-D/ocrd_all/venv/bin/activate

Now you are ready to run the OCR-D tools. Try to run one of them:

ocrd --help

Congratulation if that works. You are now ready to use the OCR-D tools. Each time when you open a new shell and want to work with OCR-D tools, you must activate the virtual Python environment again:

source $HOME/src/github/OCR-D/ocrd_all/venv/bin/activate

Welcome to the OCR-D wiki, a companion to the OCR-D website.

Articles and tutorials
Discussions
Expert section on OCR-D- workflows
Particular workflow steps
Recommended workflows
Workflow Guide
Videos
Section on Ground Truth
Clone this wiki locally