pip install pyobjc fails on macOS 10.12

Issue #173 resolved
Ivan Levchenko
created an issue

just installed python 2.7.12 with home-brew. pip install pyobjc fails on pyobjc-framework-QTKit:

Collecting macholib>=1.5 (from py2app>=0.10->pyobjc)
Building wheels for collected packages: pyobjc-framework-QTKit
  Running setup.py bdist_wheel for pyobjc-framework-QTKit ... error
  Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/pip-build-gFOk62/pyobjc-framework-QTKit/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/tmpxKeYDnpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  overriding build_packages to copy PyObjCTest
  creating build
  creating build/lib.macosx-10.12-x86_64-2.7
  creating build/lib.macosx-10.12-x86_64-2.7/QTKit
  copying Lib/QTKit/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/QTKit
  copying Lib/QTKit/_metadata.py -> build/lib.macosx-10.12-x86_64-2.7/QTKit
  creating build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtcaptureconnection.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTCaptureDecompressedVideoOutput.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtcapturedevice.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTCaptureFileOutput.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTCaptureSession.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTCaptureVideoPreviewOutput.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTCaptureView.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTCompressionOptions.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtdatareference.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qterror.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtexportoptions.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtexportsession.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtformatdescription.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtkitdefines.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtmedia.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtmetadataitem.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtmovie.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtmoviemodernizer.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_QTMovieView.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtsamplebuffer.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qttime.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qttimerange.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qttrack.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  copying PyObjCTest/test_qtutilities.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
  running build_ext
  building 'QTKit._QTKit' extension
  creating build/temp.macosx-10.12-x86_64-2.7/Modules
  clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.12-x86_64-2.7/pyobjc-include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/_QTKit.m -o build/temp.macosx-10.12-x86_64-2.7/Modules/_QTKit.o -DPyObjC_BUILD_RELEASE=1012 -Wno-deprecated-declarations -isysroot /
  Modules/_QTKit.m:6:9: fatal error: 'QTKit/QTKit.h' file not found
  #import <QTKit/QTKit.h>
          ^
  1 error generated.
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyobjc-framework-QTKit
  Running setup.py clean for pyobjc-framework-QTKit
Failed to build pyobjc-framework-QTKit
Installing collected packages: pyobjc-framework-StoreKit, pyobjc-framework-SyncServices, pyobjc-framework-SpriteKit, pyobjc-framework-SceneKit, pyobjc-framework-SearchKit, pyobjc-framework-QTKit, pyobjc-framework-WebKit, pyobjc-framework-Social, pyobjc-framework-SystemConfiguration, pyobjc-framework-ScriptingBridge, pyobjc-framework-ScreenSaver, pyobjc-framework-ServiceManagement, pyobjc, macholib
  Running setup.py install for pyobjc-framework-QTKit ... error
    Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/pip-build-gFOk62/pyobjc-framework-QTKit/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/pip-oiYPFE-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    overriding build_packages to copy PyObjCTest
    creating build
    creating build/lib.macosx-10.12-x86_64-2.7
    creating build/lib.macosx-10.12-x86_64-2.7/QTKit
    copying Lib/QTKit/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/QTKit
    copying Lib/QTKit/_metadata.py -> build/lib.macosx-10.12-x86_64-2.7/QTKit
    creating build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/__init__.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtcaptureconnection.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTCaptureDecompressedVideoOutput.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtcapturedevice.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTCaptureFileOutput.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTCaptureSession.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTCaptureVideoPreviewOutput.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTCaptureView.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTCompressionOptions.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtdatareference.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qterror.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtexportoptions.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtexportsession.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtformatdescription.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtkitdefines.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtmedia.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtmetadataitem.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtmovie.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtmoviemodernizer.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_QTMovieView.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtsamplebuffer.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qttime.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qttimerange.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qttrack.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    copying PyObjCTest/test_qtutilities.py -> build/lib.macosx-10.12-x86_64-2.7/PyObjCTest
    running build_ext
    building 'QTKit._QTKit' extension
    creating build/temp.macosx-10.12-x86_64-2.7/Modules
    clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.12-x86_64-2.7/pyobjc-include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/_QTKit.m -o build/temp.macosx-10.12-x86_64-2.7/Modules/_QTKit.o -DPyObjC_BUILD_RELEASE=1012 -Wno-deprecated-declarations -isysroot /
    Modules/_QTKit.m:6:9: fatal error: 'QTKit/QTKit.h' file not found
    #import <QTKit/QTKit.h>
            ^
    1 error generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/pip-build-gFOk62/pyobjc-framework-QTKit/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/pip-oiYPFE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/tk/nxyy9yx565qfzdhgsx64gvb00000gn/T/pip-build-gFOk62/pyobjc-framework-QTKit/

Comments (6)

  1. Ronald Oussoren repo owner

    This is fixed in the default branch, which will be PyObjC 3.2 once I've finished the port to 10.12. There's two frameworks left that need work, and both cause hard crashes when running the PyObjC test suite on 10.12.

  2. Eric Diaz (Eric Diaz, MD)

    Same problem.

    In file included from Modules/objc/fsref.m:12:
    /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymactoolbox.h:13:10: fatal error: 'QuickTime/QuickTime.h' file not found
    #include <QuickTime/QuickTime.h>
             ^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
    Installing 'pyobjc-core' failed (status 1)
    
  3. Log in to comment