PyYoshi / cChardet

universal character encoding detector
Other
383 stars 51 forks source link

error: command '/usr/bin/clang' failed with exit status 1 #53

Closed ahbon123 closed 4 years ago

ahbon123 commented 4 years ago

OS 10.15

$ pip3 install cchardet 

Python version

$ python 3.6

As I try to install cChardet, it generates the following error. Anyone could help? Thank you.

What is the problem?

    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-install-3vloyusd/cchardet/setup.py'"'"'; __file__='"'"'/private/var/folders/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-install-3vloyusd/cchardet/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/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-record-pyoqp_k9/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/cchardet
         cwd: /private/var/folders/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-install-3vloyusd/cchardet/
    Complete output (23 lines):
    cythonize: ['src/cchardet/_cchardet.pyx']
    /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-install-3vloyusd/cchardet/src/cchardet/_cchardet.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-intel-3.6
    creating build/lib.macosx-10.6-intel-3.6/cchardet
    copying src/cchardet/version.py -> build/lib.macosx-10.6-intel-3.6/cchardet
    copying src/cchardet/__init__.py -> build/lib.macosx-10.6-intel-3.6/cchardet
    running build_ext
    building 'cchardet._cchardet' extension
    creating build/temp.macosx-10.6-intel-3.6
    creating build/temp.macosx-10.6-intel-3.6/src
    creating build/temp.macosx-10.6-intel-3.6/src/cchardet
    creating build/temp.macosx-10.6-intel-3.6/src/ext
    creating build/temp.macosx-10.6-intel-3.6/src/ext/uchardet
    creating build/temp.macosx-10.6-intel-3.6/src/ext/uchardet/src
    creating build/temp.macosx-10.6-intel-3.6/src/ext/uchardet/src/LangModels
    /usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -Isrc/ext/uchardet/src -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.6-intel-3.6/src/cchardet/_cchardet.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command '/usr/bin/clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-install-3vloyusd/cchardet/setup.py'"'"'; __file__='"'"'/private/var/folders/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-install-3vloyusd/cchardet/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/_g/2rrxbrnj1xb_h5k70xgtdss00000gn/T/pip-record-pyoqp_k9/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/cchardet Check the logs for full command output.
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.