giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.28k stars 1.39k forks source link

[Mac OSX 10.14.6] installation fails. #1572

Closed kws-slalom closed 3 years ago

kws-slalom commented 5 years ago

Platform

Bug description Tried to install psutil to a conda environment using pip install psutil. Compilation terminates partway through and gcc exits with code 1. I have XCode 10.3 installed.

which gcc
/anaconda3/envs/my_env/bin/gcc

 pip install psutil
Collecting psutil
  Using cached https://files.pythonhosted.org/packages/1c/ca/5b8c1fe032a458c2c4bcbe509d1401dca9dda35c7fc46b36bb81c2834740/psutil-5.6.3.tar.gz
Building wheels for collected packages: psutil
  Building wheel for psutil (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /anaconda3/envs/linear_opt_3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/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 /private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-wheel-r9viep4a --python-tag cp37
       cwd: /private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/psutil/
  Complete output (50 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.7
  creating build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_psaix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
  creating build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_contracts.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_connections.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/runner.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_unicode.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_aix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  copying psutil/tests/__main__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
  running build_ext
  building 'psutil._psutil_osx' extension
  creating build/temp.macosx-10.7-x86_64-3.7
  creating build/temp.macosx-10.7-x86_64-3.7/psutil
  creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch
  creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch/osx
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/linear_opt_3.7/include -arch x86_64 -I/anaconda3/envs/linear_opt_3.7/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_OSX=1 -I/anaconda3/envs/linear_opt_3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.7-x86_64-3.7/psutil/_psutil_common.o
  In file included from /anaconda3/envs/linear_opt_3.7/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0,
                   from /anaconda3/envs/linear_opt_3.7/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,
                   from /anaconda3/envs/linear_opt_3.7/include/python3.7m/Python.h:11,
                   from psutil/_psutil_common.c:9:
  /anaconda3/envs/linear_opt_3.7/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
   #include_next <limits.h>  /* recurse down to the real one */
                                                               ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil
  Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil
  Running setup.py install for psutil ... error
    ERROR: Command errored out with exit status 1:
     command: /anaconda3/envs/linear_opt_3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/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 /private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-record-elpniimv/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/psutil/
    Complete output (50 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.7
    creating build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_pswindows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_common.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_psosx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_psbsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_psaix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_pslinux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_compat.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_psposix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    copying psutil/_pssunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil
    creating build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_contracts.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_connections.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/runner.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_unicode.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_aix.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    copying psutil/tests/__main__.py -> build/lib.macosx-10.7-x86_64-3.7/psutil/tests
    running build_ext
    building 'psutil._psutil_osx' extension
    creating build/temp.macosx-10.7-x86_64-3.7
    creating build/temp.macosx-10.7-x86_64-3.7/psutil
    creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch
    creating build/temp.macosx-10.7-x86_64-3.7/psutil/arch/osx
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/linear_opt_3.7/include -arch x86_64 -I/anaconda3/envs/linear_opt_3.7/include -arch x86_64 -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_OSX=1 -I/anaconda3/envs/linear_opt_3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.7-x86_64-3.7/psutil/_psutil_common.o
    In file included from /anaconda3/envs/linear_opt_3.7/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0,
                     from /anaconda3/envs/linear_opt_3.7/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34,
                     from /anaconda3/envs/linear_opt_3.7/include/python3.7m/Python.h:11,
                     from psutil/_psutil_common.c:9:
    /anaconda3/envs/linear_opt_3.7/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
     #include_next <limits.h>  /* recurse down to the real one */
                                                                 ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /anaconda3/envs/linear_opt_3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-install-_mx1dkur/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 /private/var/folders/4v/bqcs8sz94k38k863wts6qfhwldfxl5/T/pip-record-elpniimv/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Test results

n/a
kws-slalom commented 5 years ago

Apparently this is a variation of: https://stackoverflow.com/questions/30877659/fatal-error-limits-h-no-such-file-or-directory.

Looks like it fails because it can't find limits.h. How do I tell pip where to look for this file?

giulbia commented 5 years ago

Hi,

I have similar problem on the same OS but I don'thave XCode installed. I am in virtualenv created as virtualenv --python=python3.7 tfp (I had the same problem with python 3.6).

pip3 install psutil
Collecting psutil
  Using cached https://files.pythonhosted.org/packages/1c/ca/5b8c1fe032a458c2c4bcbe509d1401dca9dda35c7fc46b36bb81c2834740/psutil-5.6.3.tar.gz
Building wheels for collected packages: psutil
  Building wheel for psutil (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/tfp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/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 /private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-wheel-yjqrybq0 --python-tag cp37
       cwd: /private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/psutil/
  Complete output (43 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_pswindows.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_common.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_psosx.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_psbsd.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_psaix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_pslinux.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_compat.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_psposix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  copying psutil/_pssunos.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
  creating build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_contracts.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_connections.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/runner.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_misc.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_posix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_linux.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_sunos.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_aix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_process.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_bsd.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_system.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_osx.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/test_windows.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  copying psutil/tests/__main__.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
  running build_ext
  building 'psutil._psutil_osx' extension
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/psutil
  creating build/temp.macosx-10.9-x86_64-3.7/psutil/arch
  creating build/temp.macosx-10.9-x86_64-3.7/psutil/arch/osx
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_common.o
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil
  Running setup.py clean for psutil
Failed to build psutil
Installing collected packages: psutil
  Running setup.py install for psutil ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/tfp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/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 /private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-record-asfh8t27/install-record.txt --single-version-externally-managed --compile --install-headers /Users/giuliabianchi/Documents/Xebia/DevFest_Nantes_20191022/tf_privacy/tfp/bin/../include/site/python3.7/psutil
         cwd: /private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/psutil/
    Complete output (43 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.7
    creating build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_pswindows.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_common.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_psosx.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_psbsd.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_psaix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_pslinux.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_compat.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_psposix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    copying psutil/_pssunos.py -> build/lib.macosx-10.9-x86_64-3.7/psutil
    creating build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_contracts.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_connections.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/runner.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_unicode.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_aix.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    copying psutil/tests/__main__.py -> build/lib.macosx-10.9-x86_64-3.7/psutil/tests
    running build_ext
    building 'psutil._psutil_osx' extension
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/psutil
    creating build/temp.macosx-10.9-x86_64-3.7/psutil/arch
    creating build/temp.macosx-10.9-x86_64-3.7/psutil/arch/osx
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_common.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/giuliabianchi/Documents/Xebia/DevFest_Nantes_20191022/tf_privacy/tfp/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/psutil/setup.py'"'"'; __file__='"'"'/private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-install-5tevt_63/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 /private/var/folders/t9/sn1q5c_j2tl6q3t01l2chbp40000gn/T/pip-record-asfh8t27/install-record.txt --single-version-externally-managed --compile --install-headers /Users/giuliabianchi/Documents/Xebia/DevFest_Nantes_20191022/tf_privacy/tfp/bin/../include/site/python3.7/psutil Check the logs for full command output.
giulbia commented 5 years ago

The related issue Install fails MACOS virtualenv python3 #1053 was solved by Use shutil.disk_usage instead of psutil.disk_usage for Python 3.3+ #1057

giampaolo commented 3 years ago

There are wheels available on PYPI now, so I assume this issue should be fixed via a psutil upgrade. Closing.