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

Not abel to import cld3 python on mac #13

Open
kdk2612 opened this issue Aug 15, 2018 · 3 comments
Open

Not abel to import cld3 python on mac #13

kdk2612 opened this issue Aug 15, 2018 · 3 comments

Comments

@kdk2612
Copy link

kdk2612 commented Aug 15, 2018

Installed protobuf
Installed https://github.com/Elizafox/cld3

on import i get the following error
ImportError: dlopen(/Users/karan.kothari/anaconda/lib/python3.5/site-packages/cld3.cpython-35m-darwin.so, 2): Symbol not found: __ZN6google8protobuf2io18StringOutputStreamC1EPSs
Referenced from: /Users/karan.kothari/anaconda/lib/python3.5/site-packages/cld3.cpython-35m-darwin.so
Expected in: flat namespace
in /Users/karan.kothari/anaconda/lib/python3.5/site-packages/cld3.cpython-35m-darwin.so

Also Tried to install https://github.com/jbaiter/cld3
But get the following build error

Collecting git+https://github.com/jbaiter/cld3.git
Cloning https://github.com/jbaiter/cld3.git to /private/var/folders/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-req-build-64de67b1
Building wheels for collected packages: cld3
Running setup.py bdist_wheel for cld3 ... error
Complete output from command /Users/karan.kothari/anaconda/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-req-build-64de67b1/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/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-wheel-53bhx___ --python-tag cp35:
/Users/karan.kothari/anaconda/lib/python3.5/distutils/extension.py:132: UserWarning: Unknown Extension options: 'include_paths'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'cld3' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.5
creating build/temp.macosx-10.7-x86_64-3.5/src
creating build/temp.macosx-10.7-x86_64-3.5/src/cld_3
creating build/temp.macosx-10.7-x86_64-3.5/src/cld_3/protos
creating build/temp.macosx-10.7-x86_64-3.5/src/script_span
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/karan.kothari/anaconda/include -arch x86_64 -Isrc -I/Users/karan.kothari/anaconda/include/python3.5m -c src/cld3.cpp -o build/temp.macosx-10.7-x86_64-3.5/src/cld3.o -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from src/embedding_feature_extractor.h:23:0,
from src/nnet_language_identifier.h:22,
from src/cld3.cpp:593:
src/feature_extractor.h:45:47: fatal error: cld_3/protos/feature_extractor.pb.h: No such file or directory
#include "cld_3/protos/feature_extractor.pb.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1


Failed building wheel for cld3
Running setup.py clean for cld3
Failed to build cld3
Installing collected packages: cld3
Found existing installation: cld3 0.2.2
Uninstalling cld3-0.2.2:
Successfully uninstalled cld3-0.2.2
Running setup.py install for cld3 ... error
Complete output from command /Users/karan.kothari/anaconda/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-req-build-64de67b1/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/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-record-u49dl8xm/install-record.txt --single-version-externally-managed --compile:
/Users/karan.kothari/anaconda/lib/python3.5/distutils/extension.py:132: UserWarning: Unknown Extension options: 'include_paths'
warnings.warn(msg)
running install
running build
running build_ext
building 'cld3' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.5
creating build/temp.macosx-10.7-x86_64-3.5/src
creating build/temp.macosx-10.7-x86_64-3.5/src/cld_3
creating build/temp.macosx-10.7-x86_64-3.5/src/cld_3/protos
creating build/temp.macosx-10.7-x86_64-3.5/src/script_span
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/karan.kothari/anaconda/include -arch x86_64 -Isrc -I/Users/karan.kothari/anaconda/include/python3.5m -c src/cld3.cpp -o build/temp.macosx-10.7-x86_64-3.5/src/cld3.o -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from src/embedding_feature_extractor.h:23:0,
from src/nnet_language_identifier.h:22,
from src/cld3.cpp:593:
src/feature_extractor.h:45:47: fatal error: cld_3/protos/feature_extractor.pb.h: No such file or directory
#include "cld_3/protos/feature_extractor.pb.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1

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

Rolling back uninstall of cld3
Command "/Users/karan.kothari/anaconda/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-req-build-64de67b1/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/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-record-u49dl8xm/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/q4/539_wsw970984yk_xfmvxdrwwhmd5b/T/pip-req-build-64de67b1/

@davidstrouk
Copy link

Hi, did you find a solution for this issue?
I have a Mac OS X 10.14 with Python 3.7 and it's not working too

@houp
Copy link

houp commented Nov 16, 2018

I've fixed the issues in my fork, but you need to build from source: https://github.com/houp/cld3

@bact
Copy link

bact commented Dec 22, 2018

FYI: I have put a small documentation on CLD3 Python binding forks in issue #15

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

No branches or pull requests

4 participants