Skip to content

Mac OS wheels are not compatible with Monterey version 12.1 #1456

@w-tim

Description

@w-tim

Please provide all mandatory information!

Describe the bug (mandatory)

I have used your PyMuPDF for one year! Thanks for your effort.

I upgraded system to MacOS 12.1 today, then something about Xcode upgraded automatically. Simultaneously, I upgraded PyMuPDF from 1.19.2 to 1.19.3. After that ,I run my routine self-design app but failed. Showing Fitz error. Considering it is working properly on another Intel MBP.(all libraries are the same,incl versions), I supposed maybe 1.19.3 was incompatible for M1 MBP. I tried to downgrade or remove but failed, so deleted Fitz & PyMuPDF library manually and tried to reinstall it.

Now, always failed and showing below. (via Pycharm and terminal, all failed)

Collecting PyMuPDF==1.19.3
Using cached PyMuPDF-1.19.3.tar.gz (2.3 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Using legacy 'setup.py install' for PyMuPDF, since package 'wheel' is not installed.
Installing collected packages: PyMuPDF
Running setup.py install for PyMuPDF: started
Running setup.py install for PyMuPDF: finished with status 'error'

ERROR: Command errored out with exit status 1:
 command: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-install-qha8k814/pymupdf_58dd1a65f67141f38d5812b54be8f029/setup.py'"'"'; __file__='"'"'/private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-install-qha8k814/pymupdf_58dd1a65f67141f38d5812b54be8f029/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-record-uwufdbgk/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyMuPDF
     cwd: /private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-install-qha8k814/pymupdf_58dd1a65f67141f38d5812b54be8f029/
Complete output (24 lines):
running install
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.9
creating build/lib.macosx-10.9-universal2-3.9/fitz
copying fitz/__init__.py -> build/lib.macosx-10.9-universal2-3.9/fitz
copying fitz/fitz.py -> build/lib.macosx-10.9-universal2-3.9/fitz
copying fitz/utils.py -> build/lib.macosx-10.9-universal2-3.9/fitz
copying fitz/__main__.py -> build/lib.macosx-10.9-universal2-3.9/fitz
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'fitz._fitz' extension
creating build/temp.macosx-10.9-universal2-3.9
creating build/temp.macosx-10.9-universal2-3.9/fitz
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/usr/local/include/mupdf -I/usr/local/include -Imupdf/thirdparty/freetype/include -I/usr/local/include/freetype2 -I/usr/X11R6/include/freetype2 -I/opt/homebrew/include -I/opt/homebrew/include/mupdf -I/opt/homebrew/include/freetype2 -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c fitz/fitz_wrap.c -o build/temp.macosx-10.9-universal2-3.9/fitz/fitz_wrap.o
fitz/fitz_wrap.c:2755:10: fatal error: 'fitz.h' file not found
#include <fitz.h>
         ^~~~~~~~
1 error generated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-install-qha8k814/pymupdf_58dd1a65f67141f38d5812b54be8f029/setup.py'"'"'; file='"'"'/private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-install-qha8k814/pymupdf_58dd1a65f67141f38d5812b54be8f029/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/_h/3svyvztx0vs_x29qml4vw29r0000gn/T/pip-record-uwufdbgk/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyMuPDF Check the logs for full command output.

I tried to install other lib, successful. So maybe it is something about Fitz or PyMuPDF?

To Reproduce (mandatory)

install, always failed

Expected behavior (optional)

install successfully and no error on loading.

Screenshots (optional)

described as above

Your configuration (mandatory)

  • MacOS 12.1
  • Python 3.9.9
  • PyMuPDF 1.19.3, via PyCharm

For example, the output of print(sys.version, "\n", sys.platform, "\n", fitz.__doc__) would be sufficient (for the first two bullets).

Additional context (optional)

Metadata

Metadata

Assignees

Labels

postponepostpone to a future version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions