question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error to install dependencies - macOS 10.13 - cchardet==1.1.3

See original GitHub issue

Superset version

Commit 39ff9deb573fd0d34a2afdcb216092dccca8086b Date: Tue Aug 7 22:22:19 2018 +0200 Python: 3.7.0 Pip: 18.0 OS: macOS 10.13.6

Expected results

Install all dependencies.

Actual results

Error during dependencies installation.

Installing collected packages: cchardet, tabulator, tableschema, thrift, sasl, thrift-sasl, unidecode, superset
  Running setup.py install for cchardet ... error
    Complete output from command /Users/brunopacheco/workspace/superset/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_q/6ldlfbyd4hl0qrh0dd9kz2y00000gn/T/pip-install-un3_woar/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/_q/6ldlfbyd4hl0qrh0dd9kz2y00000gn/T/pip-record-9e58rhml/install-record.txt --single-version-externally-managed --compile --install-headers /Users/brunopacheco/workspace/superset/venv/include/site/python3.7/cchardet:
    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/cchardet
    copying src/cchardet/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/cchardet
    copying src/cchardet/version.py -> build/lib.macosx-10.9-x86_64-3.7/cchardet
    running build_ext
    building 'cchardet._cchardet' extension
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/src
    creating build/temp.macosx-10.9-x86_64-3.7/src/cchardet
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext/libcharsetdetect
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext/libcharsetdetect/mozilla
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions/universalchardet
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src
    creating build/temp.macosx-10.9-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Isrc/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base/ -Isrc/ext/libcharsetdetect/nspr-emu/ -Isrc/ext/libcharsetdetect/ -I/Users/brunopacheco/workspace/superset/venv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.9-x86_64-3.7/src/cchardet/_cchardet.o
    src/cchardet/_cchardet.cpp:2351:65: error: too many arguments to function call, expected 3, have 4
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                     ^~~~
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/include/stddef.h:100:18: note: expanded from macro 'NULL'
    #    define NULL __null
                     ^~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

Steps to reproduce

cd /path-to-superset-project pip install -r docs/requirements.txt pip install -e .

Related to

https://github.com/PyYoshi/cChardet/issues/37#issuecomment-412591328

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
gyrilcommented, Aug 22, 2018

I’m getting a similar error:

Building wheels for collected packages: cchardet
  Running setup.py bdist_wheel for cchardet ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hg/_vt9qsfj1cz3zz_wy46b5w0m0000gp/T/pip-install-owpvtjya/cchardet/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/hg/_vt9qsfj1cz3zz_wy46b5w0m0000gp/T/pip-wheel-qbnvmlbd --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.13-x86_64-3.7
  creating build/lib.macosx-10.13-x86_64-3.7/cchardet
  copying src/cchardet/version.py -> build/lib.macosx-10.13-x86_64-3.7/cchardet
  copying src/cchardet/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/cchardet
  running build_ext
  building 'cchardet._cchardet' extension
  creating build/temp.macosx-10.13-x86_64-3.7
  creating build/temp.macosx-10.13-x86_64-3.7/src
  creating build/temp.macosx-10.13-x86_64-3.7/src/cchardet
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext/libcharsetdetect
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext/libcharsetdetect/mozilla
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions/universalchardet
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src
  creating build/temp.macosx-10.13-x86_64-3.7/src/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Isrc/ext/libcharsetdetect/mozilla/extensions/universalchardet/src/base/ -Isrc/ext/libcharsetdetect/nspr-emu/ -Isrc/ext/libcharsetdetect/ -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.13-x86_64-3.7/src/cchardet/_cchardet.o
  src/cchardet/_cchardet.cpp:2351:65: error: too many arguments to function call, expected 3, have 4
      return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                     ^~~~
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/include/stddef.h:100:18: note: expanded from macro 'NULL'
  #    define NULL __null
                   ^~~~~~
  1 error generated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for cchardet

I tried both CC=gcc pip3 install superset and CC=clang pip3 install superset. Same config, running on OS X 13.6, python 3.7, pip 18.0


Edit: for some reason XCode is unable to build the latest, <2.0.0 version of cchardet. I forced install of v1.0.0 of cchardet and got it to work: pip3 install cchardet==1.0.0

0reactions
kapoostcommented, Jul 5, 2019

this worked for me:

brew install gcc@4.9
env CC=/usr/local/bin/gcc-4.9 
pip install thrift_sasl==0.2.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

If an error occurred while updating or installing macOS
The message might say that an error occurred while downloading, preparing, or installing, or that the installer is damaged or could not be ......
Read more >
Cannot install dependency on MacOS High Sierra 10.13 due ...
I am trying to build some application from source, which requires gtk+3 installed, so I tried to brew install gtk+3 and then the...
Read more >
Error installing llvm on MacOs High Siera using Brew
I got around this using the answer from here this. I modified the answer a bit by make sure I did this cmake...
Read more >
Can't install ffmpeg on macOS High Sierra 10.13.6 - Super User
Download ffmpeg for macOS from evermeet.cx. Put it in /usr/local/bin and you can execute it from any directory.
Read more >
Installing Bazel on macOS
Step 1: Install Homebrew on macOS; Step 2: Install Bazel via Homebrew. Installing using the binary installer. Step 1: Install Xcode command line...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found