Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build cchardet - osx 10.13.3 with brew python3 #37

Closed
rhamnett opened this issue Mar 7, 2018 · 17 comments
Closed

Failed to build cchardet - osx 10.13.3 with brew python3 #37

rhamnett opened this issue Mar 7, 2018 · 17 comments
Labels

Comments

@rhamnett
Copy link

rhamnett commented Mar 7, 2018

Failed building wheel for cchardet
Running setup.py clean for cchardet
Failed to build cchardet
Installing collected packages: cchardet, ccxt
Running setup.py install for cchardet ... error
Complete output from command /usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/c6/t3s_sm6906j2lm2rcp2bdmqh0000gp/T/pip-build-ni2b6d85/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 /var/folders/c6/t3s_sm6906j2lm2rcp2bdmqh0000gp/T/pip-470mvm70-record/install-record.txt --single-version-externally-managed --compile:
cythonize: ['src/cchardet/_cchardet.pyx']
running install
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-3.6
creating build/lib.macosx-10.13-x86_64-3.6/cchardet
copying src/cchardet/version.py -> build/lib.macosx-10.13-x86_64-3.6/cchardet
copying src/cchardet/init.py -> build/lib.macosx-10.13-x86_64-3.6/cchardet
running build_ext
building 'cchardet._cchardet' extension
creating build/temp.macosx-10.13-x86_64-3.6
creating build/temp.macosx-10.13-x86_64-3.6/src
creating build/temp.macosx-10.13-x86_64-3.6/src/cchardet
creating build/temp.macosx-10.13-x86_64-3.6/src/ext
creating build/temp.macosx-10.13-x86_64-3.6/src/ext/uchardet
creating build/temp.macosx-10.13-x86_64-3.6/src/ext/uchardet/src
creating build/temp.macosx-10.13-x86_64-3.6/src/ext/uchardet/src/LangModels
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Isrc/ext/uchardet/src -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.13-x86_64-3.6/src/cchardet/_cchardet.o
src/cchardet/_cchardet.cpp:1093:15: error: use of undeclared identifier 'assert'
__pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_msg); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 15, __pyx_L1_error)
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytesobject.h:89:32: note: expanded from macro 'PyBytes_GET_SIZE'
#define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op))
^
src/cchardet/_cchardet.cpp:1116:15: error: use of undeclared identifier 'assert'
__pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_msg); if (unlikely((__pyx_t_2 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(1, 19, __pyx_L1_error)
^
src/cchardet/_cchardet.cpp:596:56: note: expanded from macro '__Pyx_PyBytes_AsWritableString'
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytesobject.h:87:32: note: expanded from macro 'PyBytes_AS_STRING'
#define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)),
^
src/cchardet/_cchardet.cpp:1206:57: error: use of undeclared identifier 'assert'
__pyx_t_3 = (__pyx_v_detected_charset != Py_None) && (PyBytes_GET_SIZE(__pyx_v_detected_charset) != 0);
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytesobject.h:89:32: note: expanded from macro 'PyBytes_GET_SIZE'
#define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op))
^
src/cchardet/_cchardet.cpp:1553:15: error: use of undeclared identifier 'assert'
__pyx_t_2 = PyBytes_GET_SIZE(__pyx_v_msg); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 64, __pyx_L1_error)
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytesobject.h:89:32: note: expanded from macro 'PyBytes_GET_SIZE'
#define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op))
^
src/cchardet/_cchardet.cpp:1577:17: error: use of undeclared identifier 'assert'
__pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_msg); if (unlikely((__pyx_t_3 == ((const char*)NULL)) && PyErr_Occurred())) __PYX_ERR(1, 66, __pyx_L1_error)
^
src/cchardet/_cchardet.cpp:596:56: note: expanded from macro '__Pyx_PyBytes_AsWritableString'
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytesobject.h:87:32: note: expanded from macro 'PyBytes_AS_STRING'
#define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)),
^
src/cchardet/_cchardet.cpp:1940:15: error: use of undeclared identifier 'assert'
__pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 93, __pyx_L1_error)
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytesobject.h:89:32: note: expanded from macro 'PyBytes_GET_SIZE'
#define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op))
^
src/cchardet/_cchardet.cpp:3817:19: error: use of undeclared identifier 'assert'
*length = PyByteArray_GET_SIZE(o);
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytearrayobject.h:54:37: note: expanded from macro 'PyByteArray_GET_SIZE'
#define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)), Py_SIZE(self))
^
src/cchardet/_cchardet.cpp:3818:16: error: use of undeclared identifier 'assert'
return PyByteArray_AS_STRING(o);
^
/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/include/python3.6m/bytearrayobject.h:52:6: note: expanded from macro 'PyByteArray_AS_STRING'
(assert(PyByteArray_Check(self)),
^
8 errors generated.
error: command 'clang' failed with exit status 1

----------------------------------------

Command "/usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/c6/t3s_sm6906j2lm2rcp2bdmqh0000gp/T/pip-build-ni2b6d85/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 /var/folders/c6/t3s_sm6906j2lm2rcp2bdmqh0000gp/T/pip-470mvm70-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/c6/t3s_sm6906j2lm2rcp2bdmqh0000gp/T/pip-build-ni2b6d85/cchardet/

@rhamnett
Copy link
Author

Had another incorrect assert.h on the path, in /usr/local/include

@nikolay
Copy link

nikolay commented Aug 7, 2018

It fails on macOS 10.14 as well. I did install the uchardet package, but it still doesn't change anything. Strangely, when I do pip3 install --user --upgrade cchardet, it works fine, but when it's getting updated as a dependency, it fails.

@bnopacheco
Copy link

Happens when I try to install version 1.3.3. Any idea?

pip install cchardet==1.1.3
Collecting cchardet==1.1.3
  Using cached https://files.pythonhosted.org/packages/da/f7/486e8e1c2e045d67dcbd05e4cf3a2ae16632001172ec61f757c6c56fa2da/cchardet-1.1.3.tar.gz
Installing collected packages: cchardet
  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-ba1vcoc8/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-pjh8nvf6/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
    
    ----------------------------------------
Command "/Users/brunopacheco/workspace/superset/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_q/6ldlfbyd4hl0qrh0dd9kz2y00000gn/T/pip-install-ba1vcoc8/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-pjh8nvf6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/brunopacheco/workspace/superset/venv/include/site/python3.7/cchardet" failed with error code 1 in /private/var/folders/_q/6ldlfbyd4hl0qrh0dd9kz2y00000gn/T/pip-install-ba1vcoc8/cchardet/

@stale
Copy link

stale bot commented Oct 12, 2018

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.

@stale stale bot added the wontfix label Oct 12, 2018
@nikolay
Copy link

nikolay commented Oct 16, 2018

Any chance to fix this? Mojave 10.14 is GA already.

@stale stale bot removed the wontfix label Oct 16, 2018
@wlhgtc
Copy link

wlhgtc commented Oct 26, 2018

Same Problem,Hope could be fixed!

@stale
Copy link

stale bot commented Dec 25, 2018

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.

@stale stale bot added the wontfix label Dec 25, 2018
@stale stale bot closed this as completed Jan 1, 2019
@billtubbs
Copy link

billtubbs commented Feb 23, 2019

I have this problem. Can't install goodtables. Is there any plan to fix for Mac OS X users?

 error: command 'g++' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for cchardet

OS X 10.14.3
Python 3.6.8
pip 19.0.3

@nikolay
Copy link

nikolay commented Apr 8, 2019

@PyYoshi Please, look into this! It's been more than a year!

@ervlh
Copy link

ervlh commented Jun 18, 2019

I have same problem. Does anyone fix it?

@s2pstefan
Copy link

Same here. Please fix.

1 similar comment
@xiandong79
Copy link

Same here. Please fix.

@PyPatel
Copy link

PyPatel commented Jul 22, 2019

Guys, I have found a way around this. The previous version works.
So if you want to install this you can use: pip3 install cchardet==1.0.0

@agnesmm
Copy link

agnesmm commented Dec 8, 2019

conda install -c conda-forge cchardet resolved the issue for me

@andreygrechin
Copy link

this combination did the job:

$ pip3 list
Package    Version
---------- -------
pip        19.3.1
setuptools 42.0.2
wheel      0.33.6

$ python3 -V
Python 3.7.6

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.2

$ pip3 list # <<< result
Package         Version
--------------- -------
cchardet        2.1.5
eml-parser      1.11.6
pip             19.3.1
python-dateutil 2.8.1
setuptools      42.0.2
six             1.13.0
wheel           0.33.6

@vishalmhjn
Copy link

this combination did the job:

$ pip3 list
Package    Version
---------- -------
pip        19.3.1
setuptools 42.0.2
wheel      0.33.6

$ python3 -V
Python 3.7.6

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.2

$ pip3 list # <<< result
Package         Version
--------------- -------
cchardet        2.1.5
eml-parser      1.11.6
pip             19.3.1
python-dateutil 2.8.1
setuptools      42.0.2
six             1.13.0
wheel           0.33.6

Upgrading to Python 3.7.6 from 3.6 solved the issue for me.

@ThomasVrancken
Copy link

Thanks @agnesmm ! That worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests