pycld2
pycld2 copied to clipboard
Pip install fails on Mac OS 10.14
On Mac OS 10.14, when running "pip3 install pycld2" with Python 3.6.2 or Anaconda Python 3.6.5, I get this error
Collecting pycld2
Using cached https://files.pythonhosted.org/packages/21/77/8525fe5f147bf2819c7c9942c717c4a79b83f8003da1a3847759fb560909/pycld2-0.31.tar.gz
Installing collected packages: pycld2
Running setup.py install for pycld2 ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/v2/8ryf1cvj7nd_swlhrp6grmcr0000gn/T/pip-install-s9zo8jcz/pycld2/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/v2/8ryf1cvj7nd_swlhrp6grmcr0000gn/T/pip-record-smh8apyh/install-record.txt --single-version-externally-managed --compile:
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/pycld2
copying pycld2/init.py -> build/lib.macosx-10.6-intel-3.6/pycld2
running build_ext
building 'pycld2._pycld2' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/cld2
creating build/temp.macosx-10.6-intel-3.6/cld2/internal
creating build/temp.macosx-10.6-intel-3.6/bindings
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Icld2/internal -Icld2/public -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c cld2/internal/cldutil.cc -o build/temp.macosx-10.6-intel-3.6/cld2/internal/cldutil.o -w -O2 -m64 -fPIC
In file included from cld2/internal/cldutil.cc:20:
In file included from cld2/internal/cldutil.h:25:
In file included from cld2/internal/scoreonescriptspan.h:81:
cld2/internal/compact_lang_det_impl.h:22:10: fatal error: 'vector' file not found
#include
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/v2/8ryf1cvj7nd_swlhrp6grmcr0000gn/T/pip-install-s9zo8jcz/pycld2/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/v2/8ryf1cvj7nd_swlhrp6grmcr0000gn/T/pip-record-smh8apyh/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/v2/8ryf1cvj7nd_swlhrp6grmcr0000gn/T/pip-install-s9zo8jcz/pycld2/
The same thing happened to me. My python version is 3.5.2
Facing the same issue. Is there a way we can downgrade the xcode version to make this work? (assuming the case is xcode version)
The same issue with you guys. The more inforamtion please see below
Running setup.py bdist_wheel for pycld2 ... error
Complete output from command /miniconda2/envs/py27/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4r/rtn53zc51jg00l38sf1qdfyc0000gn/T/pip-install-eCVlnm/pycld2/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/4r/rtn53zc51jg00l38sf1qdfyc0000gn/T/pip-wheel-jk6khS --python-tag cp27:
running bdist_wheel
The [wheel] section is deprecated. Use [bdist_wheel] instead.
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/pycld2
copying pycld2/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pycld2
running build_ext
building 'pycld2._pycld2' extension
creating build/temp.macosx-10.6-x86_64-2.7
creating build/temp.macosx-10.6-x86_64-2.7/cld2
creating build/temp.macosx-10.6-x86_64-2.7/cld2/internal
creating build/temp.macosx-10.6-x86_64-2.7/bindings
gcc -fno-strict-aliasing -I/miniconda2/envs/py27/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/opt/icu4c/include -Icld2/internal -Icld2/public -I/miniconda2/envs/py27/include/python2.7 -c cld2/internal/cldutil.cc -o build/temp.macosx-10.6-x86_64-2.7/cld2/internal/cldutil.o -w -O2 -m64 -fPIC
In file included from cld2/internal/cldutil.cc:20:
In file included from cld2/internal/cldutil.h:25:
In file included from cld2/internal/scoreonescriptspan.h:81:
cld2/internal/compact_lang_det_impl.h:22:10: fatal error: 'vector' file not found
#include <vector>
^~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pycld2
I have the same problem here with macOX 10.14; same anaconda and python version
same error here, my solution was run:
CFLAGS=-stdlib=libc++ pip install pycld2
I think we may be able to include this in extra_compile_args
param to setup, but a bit afraid if that would mess with other builds.
I tried installing through `CFLAGS=-stdlib=libc++ pip install pycld2
but I get :
invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later) error