How to upgrade build system from 10.7 to 10.12 in Sierra?

I'm trying to install a python package that doesn't work when building psutils with the following error.

error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for psutil

      

The error log seems to be using the core OSX 10.7 libraries, although I'm using Sierra 10.12.

creating build/lib.macosx-10.7-x86_64-3.6
  creating build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.6/psuti

      

It mentions the availability of the 10.12 API. But I have no idea about updating the build system.

/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDateFormatter.h:53:34: error: 'introduced' undeclared here (not in a function)
         kCFISO8601DateFormatWithYear API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) = (1UL << 0),

      

I have Anaconda Python 3.6 and GCC 6.3.0. I'm on OSX 10.12.4.

Please follow the detailed error log below or visit the link on github link .

    Building wheels for collected packages: psutil
  Running setup.py bdist_wheel for psutil ... error
  Complete output from command /Users/akash/installations/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/pip-build-yw2o18bv/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/tmpjdqqg2odpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  creating build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
  creating build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/runner.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
  running build_ext
  building 'psutil._psutil_osx' extension
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/psutil
  creating build/temp.macosx-10.7-x86_64-3.6/psutil/arch
  creating build/temp.macosx-10.7-x86_64-3.6/psutil/arch/osx
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/akash/installations/anaconda3/include -arch x86_64 -I/Users/akash/installations/anaconda3/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=501 -DPSUTIL_OSX=1 -I/Users/akash/installations/anaconda3/include/python3.6m -c psutil/_psutil_osx.c -o build/temp.macosx-10.7-x86_64-3.6/psutil/_psutil_osx.o
  In file included from /usr/include/Availability.h:190:0,
                   from /usr/include/stdio.h:65,
                   from /Users/akash/installations/anaconda3/include/python3.6m/Python.h:25,
                   from psutil/_psutil_osx.c:9:
  /System/Library/Frameworks/CoreFoundation.framework/Headers/CFDateFormatter.h:53:34: error: 'introduced' undeclared here (not in a function)
       kCFISO8601DateFormatWithYear API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) = (1UL << 0),
                                    ^
  /System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:777:39: error: 'deprecated' undeclared here (not in a function)
   const CFStringRef kCFURLLabelColorKey API_DEPRECATED("Use NSURLLabelColorKey", macosx(10.6, 10.12), ios(4.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0));
                                         ^
  /System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:777:39: error: 'message' undeclared here (not in a function)
   const CFStringRef kCFURLLabelColorKey API_DEPRECATED("Use NSURLLabelColorKey", macosx(10.6, 10.12), ios(4.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0));
                                         ^
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for psutil
  Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil, blessings, requests, stevedore, bonobo
  Found existing installation: psutil 5.1.3
    DEPRECATION: Uninstalling a distutils installed project (psutil) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling psutil-5.1.3:
      Successfully uninstalled psutil-5.1.3
  Running setup.py install for psutil ... error
    Complete output from command /Users/akash/installations/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/pip-build-yw2o18bv/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/pip-m1qlazv0-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.6
    creating build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.6/psutil
    creating build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/runner.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.6/psutil/tests
    running build_ext
    building 'psutil._psutil_osx' extension
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/psutil
    creating build/temp.macosx-10.7-x86_64-3.6/psutil/arch
    creating build/temp.macosx-10.7-x86_64-3.6/psutil/arch/osx
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/akash/installations/anaconda3/include -arch x86_64 -I/Users/akash/installations/anaconda3/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=501 -DPSUTIL_OSX=1 -I/Users/akash/installations/anaconda3/include/python3.6m -c psutil/_psutil_osx.c -o build/temp.macosx-10.7-x86_64-3.6/psutil/_psutil_osx.o
    In file included from /usr/include/Availability.h:190:0,
                     from /usr/include/stdio.h:65,
                     from /Users/akash/installations/anaconda3/include/python3.6m/Python.h:25,
                     from psutil/_psutil_osx.c:9:
    /System/Library/Frameworks/CoreFoundation.framework/Headers/CFDateFormatter.h:53:34: error: 'introduced' undeclared here (not in a function)
         kCFISO8601DateFormatWithYear API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) = (1UL << 0),
                                      ^
    /System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:777:39: error: 'deprecated' undeclared here (not in a function)
     const CFStringRef kCFURLLabelColorKey API_DEPRECATED("Use NSURLLabelColorKey", macosx(10.6, 10.12), ios(4.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0));
                                           ^
    /System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:777:39: error: 'message' undeclared here (not in a function)
     const CFStringRef kCFURLLabelColorKey API_DEPRECATED("Use NSURLLabelColorKey", macosx(10.6, 10.12), ios(4.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0));
                                           ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
  Rolling back uninstall of psutil
Command "/Users/akash/installations/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/pip-build-yw2o18bv/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/pip-m1qlazv0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/t2/tg4jlfqn715g4p9_5yh1kzsc0000gn/T/pip-build-yw2o18bv/psutil/

      

+3


source to share





All Articles