Skip to content

Instantly share code, notes, and snippets.

@terwey
Created October 15, 2024 12:34
Show Gist options
  • Save terwey/dab5a913e2dbcacd75073aee607c614c to your computer and use it in GitHub Desktop.
Save terwey/dab5a913e2dbcacd75073aee607c614c to your computer and use it in GitHub Desktop.
macos python-poppler fatal error: 'ctime' file not found

The steps below fix it, basically we skip using clang. Check the paths for yourself if the gcc version is correct.

  1. Installed GCC via Homebrew:

    brew install gcc
  2. Set environment variables to use GCC 14:

    export CPLUS_INCLUDE_PATH="/opt/homebrew/Cellar/gcc/14.2.0/include/c++/14/"
    export CC=/opt/homebrew/bin/gcc-14
    export CXX=/opt/homebrew/bin/g++-14
  3. Installed python-poppler successfully using the specific GCC version:

    CC=/opt/homebrew/bin/gcc-14 CXX=/opt/homebrew/bin/g++-14 pip install python-poppler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment