Skip to content

C. Installation in OSX

Bill Fitzgerald edited this page Aug 3, 2025 · 2 revisions

These instructions assume you have a running Mac computer running a recent version of OSX. These install instructions are all entered via the command line.

0. Optional: Switch to bash

I prefer bash to zsh. This is arbitrary, so feel free to skip this step.

chsh -s /bin/bash

1. Install Xcode, which provides basic tools for making fun things in OSX.

1a. This works in nearly all cases

xcode-select --install

1b. If 1a doesn't work

If the standard command does not install Xcode then the install might need to be installed via the software update process.

In the terminal window, enter:

softwareupdate --list

If there is an update related to Xcode, you will see it listed.

If you have more than one version, I generally recommend going with the latest version:

softwareupdate --install "Command Line Tools for Xcode-XX.Y"

Replace XX.Y with the correct version number

1c. Verify the install

To verify the install, enter these two commands:

xcode-select -p - this should show the version of Xcode you have installed.

gcc --version - this should give you information about gcc

2. Install Homebrew, a package manager for OSX.

This process is straightforward. The best and most current instructions are available from the Homebrew web site: https://brew.sh/

3. Install Dependencies

Once Homebrew is installed, use it to install some additional dependencies:

  • Ghostscript: brew install ghostscript
  • ImageMagick: brew install imagemagick
  • Geckodriver: brew install geckodriver
  • OCRMyPDF: brew install ocrmypdf

At present, OCRMyPDF is not required on for Trapper Keeper on OSX, but it will be incorporated in the near future. See this issue for details: https://github.com/billfitzgerald/trapper-keeper/issues/19

4. Install Python and Create a Virtual Environment

OSX ships with an outdated version of Python. Use Homebrew to get the latest version.

brew install python

Check your version:

  • python --version
  • python3 --version

When you run python3 --version you should see a version of 3.9.10 or greater.

Use pip to install virtualenv. Pip is installed alongside python, and virtualenv allows you to create virtual environments for different projects using Python.

pip3 install virtualenv

5. Create the directory for the project:

In this documentation, you will create a project in your Documents directory.

  • cd ~/Documents
  • mkdir python-projects
  • cd python-projects
  • mkdir trap_keep
  • cd trap_keep

6. Finish Up!

Now that you have created a directory at ~/Documents/python-projects/trap_keep you can create the virtual environment for the project.

  • virtualenv venv
  • source venv/bin/activate
  • git clone https://github.com/billfitzgerald/trapper-keeper.git
  • cd trapper-keeper/
  • pip install -r requirements.txt

You are now ready to archive some urls!