Comments (37)
@mosynaq If you are using conda try: conda install -c conda-forge cld2-cffi
from textacy.
Turns out cld2-cffi won't compile on the current version of gcc
. But it works with an older GCC. So for users running a current GCC (>5), this will probably work:
sudo env CC=/usr/bin/gcc-5 pip install -U cld2-cffi
sudo pip install textacy
from textacy.
:) It worked. Thank you for the step by step.
Have you heard back from the cld2-cffi folks?
No.
from textacy.
Hi @saulshanabrook , it's strange that this dependency sometimes gives folks trouble, and I'm honestly not sure how to resolve it. It's a core dependency in the sense that it detects the language of a text in the case that the user doesn't know it a priori — and it was the best implementation of that I could find — so I don't think I can make it optional by default. (If you know of a different, equally good language detector, please point me to it!)
Glad you found a workaround, and sorry about the trouble.
from textacy.
@bdewilde That makes sense. After I installed libffi-dev
the install succeeded. If anyone else is extending the jupyter/scipy-notebook
image, I added this to my Dockerfile
to get it to install:
RUN apt-get update
# switch to root user to install package
USER root
RUN apt-get install -y libffi-dev
USER jovyan
RUN pip install textacy
from textacy.
I keep meaning to publish this dep as a python many wheels which would make this problem go away for people.
from textacy.
On a windows 64-bit environment - I found one way to work around this: Download source from pypi, source on cld2-cffi github (there is a version problem between the two - 1.3 vs. 1.4). Copied over the pypi w/ pypi version dependencies to work with textacy - setup.py install. Seemed to work fine.
from textacy.
import textacy
doc2 = textacy.Doc(unicode(raw_text), lang=u'en')
This works for me to avoid all the commenting out phase from text_utils...
I think the error persists in the version: textacy-0.6.0
from textacy.
Hey @gryBox, sorry about the trouble! I see that you posted on cld2-cffi
's github page a week ago, but haven't heard back. Please keep me posted if they respond. I must say, I don't know much about troubleshooting other folks' packages on Windows, but I do have a hack/solution for you on the textacy
side.
Fortunately, cld2-cffi
is used in textacy
only in the text_utils.detect_language()
function, which is called automatically when a new TextDoc
is initialized without a specified language. If you know the language of the text(s) you'll be working with, passing in the appropriate language code (e.g. "en") will bypass this function and thus the cld2-cffi
dependency. If you comment out this line and, I think, remove the dependency from setup.py
here, you should be able to install via $ python setup.py install
.
Please let me know if this does the trick. :)
from textacy.
cld2-cffi is used in textacy only in the text_utils.detect_language()...comment out this line
Perfect, Thanks, exactly what I was hoping for. I will let you know how it goes.
from textacy.
Hey @gryBox , did this work out for you? Have you heard back from the cld2-cffi folks? I'd like to close out the issue if it's been resolved, either through hack or actual solution... Thanks!
from textacy.
Hi - Sorry for the delay - I only work on this once a week :(. Testing it
tonight.
Itay Livni
On Thu, Mar 24, 2016 at 10:30 AM, Burton DeWilde [email protected]
wrote:
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#5 (comment)
from textacy.
Update for anyone else who finds this page:
I was able to complete the install by uninstalling the cld2-cffi library that comes with textacy and reinstalling it as a standalone. Then when you run pip install textacy
it will already have the correct version.
from textacy.
Now that is interesting - Because that did not work for me. It was
sometime after fiddling with different build orders that I contacted cld2-cffi
and then Burton
Itay Livni
On Tue, Jun 21, 2016 at 9:37 AM, Ares513 [email protected] wrote:
Update for anyone else who finds this page:
I was able to complete the install by uninstalling the cld2-cffi library
that comes with textacy and reinstalling it as a standalone. Then when you
run pip install textacy it will already have the correct version.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AP_JQfh6wtq3n8nChqnKiX4OEeCtTu3Wks5qN_cNgaJpZM4H0mCF
.
from textacy.
I am also getting this error when I try to install textacy in the jupyter/scipy-notebook
Docker image.
$ docker run --rm jupyter/scipy-notebook pip install textacy
Collecting textacy
Downloading textacy-0.3.1-py2.py3-none-any.whl (139kB)
Collecting spacy>=1.0.1 (from textacy)
Downloading spacy-1.1.2.tar.gz (2.5MB)
Collecting python-levenshtein>=0.12.0 (from textacy)
Downloading python-Levenshtein-0.12.0.tar.gz (48kB)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.10.0 in /opt/conda/lib/python3.5/site-packages (from textacy)
Collecting pyphen>=0.9.4 (from textacy)
Downloading Pyphen-0.9.4-py2.py3-none-any.whl (1.9MB)
Collecting backports.csv>=1.0.1 (from textacy)
Downloading backports.csv-1.0.2-py2.py3-none-any.whl
Collecting ijson>=2.3 (from textacy)
Downloading ijson-2.3-py2.py3-none-any.whl
Collecting fuzzywuzzy>=0.12.0 (from textacy)
Downloading fuzzywuzzy-0.12.0-py2.py3-none-any.whl
Collecting unidecode>=0.04.19 (from textacy)
Downloading Unidecode-0.04.19.tar.gz (204kB)
Collecting gensim>=0.13.2 (from textacy)
Downloading gensim-0.13.3.tar.gz (7.0MB)
Requirement already satisfied (use --upgrade to upgrade): matplotlib>=1.5.0 in /opt/conda/lib/python3.5/site-packages (from textacy)
Collecting cachetools>=2.0.0 (from textacy)
Downloading cachetools-2.0.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): networkx>=1.11 in /opt/conda/lib/python3.5/site-packages (from textacy)
Collecting pyemd>=0.3.0 (from textacy)
Downloading pyemd-0.3.0.tar.gz (55kB)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8.0 in /opt/conda/lib/python3.5/site-packages (from textacy)
Collecting cytoolz>=0.8.0 (from textacy)
Downloading cytoolz-0.8.0.tar.gz (349kB)
Requirement already satisfied (use --upgrade to upgrade): scikit-learn>=0.17.0 in /opt/conda/lib/python3.5/site-packages (from textacy)
Collecting cld2-cffi>=0.1.4 (from textacy)
Downloading cld2-cffi-0.1.4.tar.gz (17.6MB)
Complete output from command python setup.py egg_info:
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/opt/conda/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/opt/conda/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/opt/conda/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/conda/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/conda/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/bdist_egg.py", line 161, in run
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/bdist_egg.py", line 147, in call_command
File "/opt/conda/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/install_lib.py", line 10, in run
File "/opt/conda/lib/python3.5/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/opt/conda/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/build_ext.py", line 66, in run
File "/opt/conda/lib/python3.5/site-packages/Cython/Distutils/build_ext.py", line 164, in run
_build_ext.build_ext.run(self)
File "/opt/conda/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/opt/conda/lib/python3.5/site-packages/Cython/Distutils/build_ext.py", line 172, in build_extensions
self.build_extension(ext)
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/build_ext.py", line 178, in build_extension
File "/opt/conda/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/opt/conda/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/opt/conda/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 154, in save_modules
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 195, in setup_context
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 243, in run_setup
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 273, in run
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 242, in runner
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 46, in _execfile
File "/tmp/easy_install-pds3c9rb/cffi-1.8.3/setup.py", line 193, in <module>
)
File "/opt/conda/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/easy_install.py", line 1100, in run_setup
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 246, in run_setup
File "/opt/conda/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 195, in setup_context
File "/opt/conda/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 166, in save_modules
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 141, in resume
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 154, in save_modules
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 195, in setup_context
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 243, in run_setup
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 273, in run
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 242, in runner
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/sandbox.py", line 46, in _execfile
File "/tmp/easy_install-pds3c9rb/cffi-1.8.3/setup.py", line 193, in <module>
)
File "/opt/conda/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-p5ti2uzw/cld2-cffi/setup.py", line 191, in <module>
'Topic :: Text Processing :: Linguistic'
File "/opt/conda/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/dist.py", line 269, in __init__
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/dist.py", line 313, in fetch_build_eggs
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/pkg_resources/__init__.py", line 826, in resolve
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/pkg_resources/__init__.py", line 1092, in best_match
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/pkg_resources/__init__.py", line 1104, in obtain
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/dist.py", line 380, in fetch_build_egg
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/easy_install.py", line 664, in easy_install
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/easy_install.py", line 694, in install_item
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/easy_install.py", line 875, in install_eggs
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/easy_install.py", line 1114, in build_and_install
File "/opt/conda/lib/python3.5/site-packages/setuptools-23.0.0-py3.5.egg/setuptools/command/easy_install.py", line 1102, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-p5ti2uzw/cld2-cffi/
Maybe cld2-cffi
could be set to an optional dependency?
from textacy.
EDIT: Never mind textacy fails to import since it tries to import cld2
As a workaround, I installed all the dependencies besides cld2-cffi
first:
pip install 'cachetools>=2.0.0' 'backports.csv>=1.0.1' 'cytoolz>=0.8.0' 'ftfy>=4.2.0' 'fuzzywuzzy>=0.12.0' 'gensim>=0.13.2' 'ijson>=2.3' 'matplotlib>=1.5.0' 'networkx>=1.11' 'numpy>=1.8.0' 'pyemd>=0.3.0' 'pyphen>=0.9.4' 'python-levenshtein>=0.12.0' 'requests>=2.10.0' 'scipy>=0.17.0' 'scikit-learn>=0.17.0' 'spacy>=1.0.1' 'unidecode>=0.04.19'
And then installed textacy
without deps:
pip install --no-deps textacy
from textacy.
Textacy is uninstallable for me because of this issue. Cld2-cffi won't build. I opened a bug report about it here, but I agree that it'd be nice if textacy didn't depend on a broken package.
from textacy.
@JonathanReeve Looks like your system has agcc
issue, which unfortunately isn't something I can help you with. If you need a workaround, there are examples above...
from textacy.
My system's gcc
is fine, but cld2-cffi is broken. To reproduce, run pip install -U textacy
and notice that it fails to build. This is with the very latest python, pip, and other libraries from the Arch Linux repos.
from textacy.
I just installed from scratch on macOS, and everything went as expected. Sorry I can't reproduce or assist with this.
from textacy.
MacOS typically has old software, in my experience, so this could become an issue for MacOS users once the new library version that causes this makes its way downstream. Just a heads-up. Here are a few versions that might be relevant:
$ for prog in python pip gcc; do $prog --version; done
Python 3.5.2
pip 9.0.1 from /usr/lib/python3.5/site-packages (python 3.5)
gcc (GCC) 6.2.1 20160830
from textacy.
Hi @JonathanReeve , thanks for opening that issue on cld2-cffi's repo — I'll keep an eye on it over there. If Greg isn't able to find a good solution (wheels?! 🙏), I'll see what I can do to switch textacy to a different language detector. In the meantime, very sorry about the hassle!
from textacy.
Cool! And no worries! I'm psyched to be able to install textacy now and mess around with it.
from textacy.
Hi!
I am getting the following error while installing textacy.
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cffi')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rhsRlu/cld2-cffi/
I tried the method suggested by @JonathanReeve but still it didn't work.
from textacy.
Hi @ranka47 , thanks for the HUP. I have no way to debug this because I don't know anything about your dev environment. It doesn't look like any development has happened on cld2-cffi in a while — I may just have to find a different language detection dependency.
from textacy.
Its a newly installed Ubuntu 16.04.
I am currently working on n-grams and sentence segmentation. Do you think this dependency is required? I was thinking of skipping it by installing textacy using the method you suggested in this thread back in March 2016,
from textacy.
@terratenney Thanks. Well it was Ubuntu but using
pip install --upgrade 'git+https://github.com/GregBowyer/cld2-cffi.git'
and then running
pip install textacy
did solve the job.
By the first command it installed 0.1.3 version of cld2-ciff. With the second command it uninstalled the previous version and installed the 0.1.4 version of the same and the installation was successful.
from textacy.
A conda package in the conda-forge channel is on the way: conda-forge/staged-recipes#2448
That would ease the installation on OSX, Windows and even old Linux systems.
from textacy.
Ah nice thanks for the conda packaging
from textacy.
@GregBowyer my pleasure. Feel free to comment in the PR if you want to be added as recipe maintainer for cld2-cffi
or textacy
.
from textacy.
from textacy.
Finally a workaround: CFLAGS="-Wno-narrowing" pip install cld2-cffi
works. Thanks to fanovpn for posting it on the cld2-cffi issue.
from textacy.
Sorry to post! For me following did NOT work! I have linux Mint 18.1, gcc version 5.4.0 20160609 and anaconda3 v4.3.1.
Finally a workaround: CFLAGS="-Wno-narrowing" pip install cld2-cffi works. Thanks to fanovpn for posting it on the cld2-cffi issue.
The error:
$ pip install textacy
Collecting textacy
Using cached textacy-0.3.4-py2.py3-none-any.whl
Requirement already satisfied: scikit-learn>=0.17.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Collecting ijson>=2.3 (from textacy)
Using cached ijson-2.3-py2.py3-none-any.whl
Requirement already satisfied: scipy>=0.17.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Requirement already satisfied: spacy<2.0.0,>=1.7.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Collecting cachetools>=2.0.0 (from textacy)
Using cached cachetools-2.0.0-py2.py3-none-any.whl
Requirement already satisfied: networkx>=1.11 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Collecting pyphen>=0.9.4 (from textacy)
Using cached Pyphen-0.9.4-py2.py3-none-any.whl
Collecting python-levenshtein>=0.12.0 (from textacy)
Using cached python-Levenshtein-0.12.0.tar.gz
Requirement already satisfied: requests>=2.10.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Collecting pyemd>=0.3.0 (from textacy)
Using cached pyemd-0.4.3.tar.gz
Requirement already satisfied: ftfy<5.0.0,>=4.2.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Requirement already satisfied: cytoolz>=0.8.0 in /home/MYNAME/anaconda3/lib/python3.6/site-packages (from textacy)
Collecting cld2-cffi>=0.1.4 (from textacy)
Using cached cld2-cffi-0.1.4.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/cld2_cffi.egg-info
writing pip-egg-info/cld2_cffi.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/cld2_cffi.egg-info/dependency_links.txt
writing requirements to pip-egg-info/cld2_cffi.egg-info/requires.txt
writing top-level names to pip-egg-info/cld2_cffi.egg-info/top_level.txt
writing manifest file 'pip-egg-info/cld2_cffi.egg-info/SOURCES.txt'
In file included from cld2/__pycache__/_cffi__x8faeddebx1977d085.c:208:0:
cld2/binding_decls.h:32:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int cld_num_languages();
^
cld2/binding_decls.h:33:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char** cld_languages();
^
cld2/binding_decls.h:34:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int cld_num_langcodes();
^
cld2/binding_decls.h:35:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char** cld_langcodes();
^
cld2/binding_decls.h:36:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int cld_num_encodings();
^
cld2/binding_decls.h:37:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char** cld_supported_encodings();
^
cld2/binding_decls.h:39:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
cld_results_t* cld_create_results();
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/binding.cc: In function ‘int cld_detect(char*, int, cld_results_t*, const char*, const char*, const char*, const char*, int, int, int, int, int, int, int, int, int)’:
cld2/binding.cc:165:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int i=0; i<num_chunks; i++) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/compact_lang_det_hint_code.cc: In function ‘std::__cxx11::string CLD2::TrimCLDLangTagsHint(const string&)’:
cld2/internal/compact_lang_det_hint_code.cc:1060:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (comma == string::npos) {comma = langtags.size();} // fake trailing comma
^
cld2/internal/compact_lang_det_hint_code.cc: In function ‘void CLD2::SetCLDLangTagsHint(const string&, CLD2::CLDLangPriors*)’:
cld2/internal/compact_lang_det_hint_code.cc:1403:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (comma == string::npos) {comma = langtags.size();} // fake trailing comma
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/compact_lang_det_impl.cc: In function ‘void CLD2::CalcSummaryLang(CLD2::DocTote*, int, const int*, const CLD2::Language*, const int*, CLD2::Language*, bool*, bool, bool, int)’:
cld2/internal/compact_lang_det_impl.cc:1455:7: warning: unused variable ‘plang_second’ [-Wunused-variable]
int plang_second = PerScriptNumber(ULScript_Latin, language3[active_slot[1]]);
^
cld2/internal/compact_lang_det_impl.cc: In function ‘CLD2::Language CLD2::DetectLanguageSummaryV2(const char*, int, bool, const CLD2::CLDHints*, bool, int, CLD2::Language, CLD2::Language*, int*, double*, CLD2::ResultChunkVector*, int*, bool*)’:
cld2/internal/compact_lang_det_impl.cc:1849:14: warning: unused variable ‘ulscript’ [-Wunused-variable]
ULScript ulscript = scriptspan.ulscript;
^
cld2/internal/compact_lang_det_impl.cc:1788:7: warning: unused variable ‘next_other_tote’ [-Wunused-variable]
int next_other_tote = 2;
^
cld2/internal/compact_lang_det_impl.cc:1789:7: warning: unused variable ‘tote_num’ [-Wunused-variable]
int tote_num = 0;
^
cld2/internal/compact_lang_det_impl.cc:1793:8: warning: unused variable ‘tote_seen’ [-Wunused-variable]
bool tote_seen[4] = {false, false, false, false};
^
cld2/internal/compact_lang_det_impl.cc:1794:7: warning: unused variable ‘tote_grams’ [-Wunused-variable]
int tote_grams[4] = {0, 0, 0, 0}; // Number in partial chunk
^
cld2/internal/compact_lang_det_impl.cc:1795:12: warning: unused variable ‘tote_script’ [-Wunused-variable]
ULScript tote_script[4] =
^
cld2/internal/compact_lang_det_impl.cc:1814:7: warning: unused variable ‘advance_by’ [-Wunused-variable]
int advance_by = 2; // Advance 2 bytes
^
cld2/internal/compact_lang_det_impl.cc:1815:7: warning: unused variable ‘advance_limit’ [-Wunused-variable]
int advance_limit = textlimit >> 3; // For first 1/8 of max document
^
cld2/internal/compact_lang_det_impl.cc:1817:7: warning: variable ‘initial_word_span’ set but not used [-Wunused-but-set-variable]
int initial_word_span = kDefaultWordSpan;
^
cld2/internal/compact_lang_det_impl.cc:1828:7: warning: unused variable ‘chunksizeunis’ [-Wunused-variable]
int chunksizeunis = (chunksizequads * 5) >> 1;
^
cld2/internal/compact_lang_det_impl.cc:1832:7: warning: unused variable ‘spantooshortlimit’ [-Wunused-variable]
int spantooshortlimit = kShortSpanThresh;
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/offsetmap.cc: In member function ‘void CLD2::OffsetMap::Printmap(const char*)’:
cld2/internal/offsetmap.cc:84:54: warning: array subscript has type ‘char’ [-Wchar-subscripts]
fprintf(fout, "%c%02d ", "&=+-"[OpPart(diffs_[i])], LenPart(diffs_[i]));
^
cld2/internal/offsetmap.cc: In member function ‘void CLD2::OffsetMap::DumpString()’:
cld2/internal/offsetmap.cc:210:56: warning: array subscript has type ‘char’ [-Wchar-subscripts]
fprintf(stderr, "%c%02d ", "&=+-"[OpPart(diffs_[i])], LenPart(diffs_[i]));
^
cld2/internal/offsetmap.cc: In member function ‘bool CLD2::OffsetMap::MoveLeft()’:
cld2/internal/offsetmap.cc:404:8: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
bool retval = true;
^
cld2/internal/offsetmap.cc: In static member function ‘static bool CLD2::OffsetMap::CopyInserts(CLD2::OffsetMap*, CLD2::OffsetMap*)’:
cld2/internal/offsetmap.cc:484:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (ok && (source->next_diff_sub_ != source->diffs_.size())) {
^
cld2/internal/offsetmap.cc: In static member function ‘static bool CLD2::OffsetMap::CopyDeletes(CLD2::OffsetMap*, CLD2::OffsetMap*)’:
cld2/internal/offsetmap.cc:498:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (ok && (source->next_diff_sub_ != source->diffs_.size())) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/utf8statetable.cc: In function ‘int CLD2::UTF8GenericReplaceInternalTwoByte(const UTF8ReplaceObj_2*, const StringPiece&, StringPiece&, bool, int*, int*, int*, CLD2::OffsetMap*)’:
cld2/internal/utf8statetable.cc:933:7: warning: variable ‘src_lll’ set but not used [-Wunused-but-set-variable]
int src_lll = srclimit - src;
^
cld2/internal/utf8statetable.cc:934:7: warning: variable ‘dst_lll’ set but not used [-Wunused-but-set-variable]
int dst_lll = dstlimit - dst;
^
cld2/internal/utf8statetable.cc: At global scope:
cld2/internal/utf8statetable.cc:179:13: warning: ‘bool CLD2::IsPropObj(const CLD2::UTF8StateMachineObj&)’ defined but not used [-Wunused-function]
static bool IsPropObj(const UTF8StateMachineObj& obj) {
^
cld2/internal/utf8statetable.cc:184:13: warning: ‘bool CLD2::IsPropObj_2(const CLD2::UTF8StateMachineObj_2&)’ defined but not used [-Wunused-function]
static bool IsPropObj_2(const UTF8StateMachineObj_2& obj) {
^
cld2/internal/utf8statetable.cc:189:13: warning: ‘bool CLD2::IsScanObj(const CLD2::UTF8StateMachineObj&)’ defined but not used [-Wunused-function]
static bool IsScanObj(const UTF8StateMachineObj& obj) {
^
cld2/internal/utf8statetable.cc:194:13: warning: ‘bool CLD2::IsReplaceObj(const CLD2::UTF8StateMachineObj&)’ defined but not used [-Wunused-function]
static bool IsReplaceObj(const UTF8StateMachineObj& obj) {
^
cld2/internal/utf8statetable.cc:200:13: warning: ‘bool CLD2::IsReplaceObj_2(const CLD2::UTF8StateMachineObj_2&)’ defined but not used [-Wunused-function]
static bool IsReplaceObj_2(const UTF8StateMachineObj_2& obj) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Traceback (most recent call last):
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/vengine_cpy.py", line 155, in load_library
self.verifier.modulefilename)
File "/home/MYNAME/anaconda3/lib/python3.6/imp.py", line 342, in load_dynamic
return _load(spec)
File "<frozen importlib._bootstrap>", line 675, in _load
File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
File "<frozen importlib._bootstrap>", line 560, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
ImportError: /tmp/pip-build-p9gkq5tz/cld2-cffi/cld2/__pycache__/_cffi__x8faeddebx1977d085.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-p9gkq5tz/cld2-cffi/setup.py", line 191, in <module>
'Topic :: Text Processing :: Linguistic'
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 280, in run
self.find_sources()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 295, in find_sources
mm.run()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 526, in run
self.add_defaults()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 562, in add_defaults
sdist.add_defaults(self)
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 34, in add_defaults
self._add_defaults_python()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/sdist.py", line 133, in _add_defaults_python
build_py = self.get_finalized_command('build_py')
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/build_py.py", line 34, in finalize_options
orig.build_py.finalize_options(self)
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/command/build_py.py", line 45, in finalize_options
('force', 'force'))
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-p9gkq5tz/cld2-cffi/setup.py", line 143, in finalize_options
self.distribution.ext_modules = get_ext_modules()
File "/tmp/pip-build-p9gkq5tz/cld2-cffi/setup.py", line 128, in get_ext_modules
import cld2
File "/tmp/pip-build-p9gkq5tz/cld2-cffi/cld2/__init__.py", line 190, in <module>
extra_compile_args=_COMPILER_ARGS)
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/api.py", line 437, in verify
lib = self.verifier.load_library()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/verifier.py", line 114, in load_library
return self._load_library()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/verifier.py", line 225, in _load_library
return self._vengine.load_library()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/vengine_cpy.py", line 158, in load_library
raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/tmp/pip-build-p9gkq5tz/cld2-cffi/cld2/__pycache__/_cffi__x8faeddebx1977d085.cpython-36m-x86_64-linux-gnu.so': /tmp/pip-build-p9gkq5tz/cld2-cffi/cld2/__pycache__/_cffi__x8faeddebx1977d085.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm
----------------------------------------
from textacy.
Hi @mosynaq I'm confused. Did you already CFLAGS="-Wno-narrowing" pip install cld2-cffi
before doing pip install textacy
? If not, you should give that a try.
FWIW in the next version of textacy, this dependency will be optional, because frankly I'm tired of dealing with its installation problems. I've still not found a comparable (in terms of speed and accuracy) replacement for language detection, but I'll figure something out.
from textacy.
Hi @bdewilde. Yes, I did so! And I received the following:
$ CFLAGS="-Wno-narrowing" pip install cld2-cffi
Collecting cld2-cffi
Using cached cld2-cffi-0.1.4.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/cld2_cffi.egg-info
writing pip-egg-info/cld2_cffi.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/cld2_cffi.egg-info/dependency_links.txt
writing requirements to pip-egg-info/cld2_cffi.egg-info/requires.txt
writing top-level names to pip-egg-info/cld2_cffi.egg-info/top_level.txt
writing manifest file 'pip-egg-info/cld2_cffi.egg-info/SOURCES.txt'
In file included from cld2/__pycache__/_cffi__x8faeddebx1977d085.c:208:0:
cld2/binding_decls.h:32:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int cld_num_languages();
^
cld2/binding_decls.h:33:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char** cld_languages();
^
cld2/binding_decls.h:34:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int cld_num_langcodes();
^
cld2/binding_decls.h:35:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char** cld_langcodes();
^
cld2/binding_decls.h:36:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int cld_num_encodings();
^
cld2/binding_decls.h:37:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char** cld_supported_encodings();
^
cld2/binding_decls.h:39:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
cld_results_t* cld_create_results();
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/binding.cc: In function ‘int cld_detect(char*, int, cld_results_t*, const char*, const char*, const char*, const char*, int, int, int, int, int, int, int, int, int)’:
cld2/binding.cc:165:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (unsigned int i=0; i<num_chunks; i++) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/compact_lang_det_hint_code.cc: In function ‘std::__cxx11::string CLD2::TrimCLDLangTagsHint(const string&)’:
cld2/internal/compact_lang_det_hint_code.cc:1060:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (comma == string::npos) {comma = langtags.size();} // fake trailing comma
^
cld2/internal/compact_lang_det_hint_code.cc: In function ‘void CLD2::SetCLDLangTagsHint(const string&, CLD2::CLDLangPriors*)’:
cld2/internal/compact_lang_det_hint_code.cc:1403:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (comma == string::npos) {comma = langtags.size();} // fake trailing comma
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/compact_lang_det_impl.cc: In function ‘void CLD2::CalcSummaryLang(CLD2::DocTote*, int, const int*, const CLD2::Language*, const int*, CLD2::Language*, bool*, bool, bool, int)’:
cld2/internal/compact_lang_det_impl.cc:1455:7: warning: unused variable ‘plang_second’ [-Wunused-variable]
int plang_second = PerScriptNumber(ULScript_Latin, language3[active_slot[1]]);
^
cld2/internal/compact_lang_det_impl.cc: In function ‘CLD2::Language CLD2::DetectLanguageSummaryV2(const char*, int, bool, const CLD2::CLDHints*, bool, int, CLD2::Language, CLD2::Language*, int*, double*, CLD2::ResultChunkVector*, int*, bool*)’:
cld2/internal/compact_lang_det_impl.cc:1849:14: warning: unused variable ‘ulscript’ [-Wunused-variable]
ULScript ulscript = scriptspan.ulscript;
^
cld2/internal/compact_lang_det_impl.cc:1788:7: warning: unused variable ‘next_other_tote’ [-Wunused-variable]
int next_other_tote = 2;
^
cld2/internal/compact_lang_det_impl.cc:1789:7: warning: unused variable ‘tote_num’ [-Wunused-variable]
int tote_num = 0;
^
cld2/internal/compact_lang_det_impl.cc:1793:8: warning: unused variable ‘tote_seen’ [-Wunused-variable]
bool tote_seen[4] = {false, false, false, false};
^
cld2/internal/compact_lang_det_impl.cc:1794:7: warning: unused variable ‘tote_grams’ [-Wunused-variable]
int tote_grams[4] = {0, 0, 0, 0}; // Number in partial chunk
^
cld2/internal/compact_lang_det_impl.cc:1795:12: warning: unused variable ‘tote_script’ [-Wunused-variable]
ULScript tote_script[4] =
^
cld2/internal/compact_lang_det_impl.cc:1814:7: warning: unused variable ‘advance_by’ [-Wunused-variable]
int advance_by = 2; // Advance 2 bytes
^
cld2/internal/compact_lang_det_impl.cc:1815:7: warning: unused variable ‘advance_limit’ [-Wunused-variable]
int advance_limit = textlimit >> 3; // For first 1/8 of max document
^
cld2/internal/compact_lang_det_impl.cc:1817:7: warning: variable ‘initial_word_span’ set but not used [-Wunused-but-set-variable]
int initial_word_span = kDefaultWordSpan;
^
cld2/internal/compact_lang_det_impl.cc:1828:7: warning: unused variable ‘chunksizeunis’ [-Wunused-variable]
int chunksizeunis = (chunksizequads * 5) >> 1;
^
cld2/internal/compact_lang_det_impl.cc:1832:7: warning: unused variable ‘spantooshortlimit’ [-Wunused-variable]
int spantooshortlimit = kShortSpanThresh;
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/offsetmap.cc: In member function ‘void CLD2::OffsetMap::Printmap(const char*)’:
cld2/internal/offsetmap.cc:84:54: warning: array subscript has type ‘char’ [-Wchar-subscripts]
fprintf(fout, "%c%02d ", "&=+-"[OpPart(diffs_[i])], LenPart(diffs_[i]));
^
cld2/internal/offsetmap.cc: In member function ‘void CLD2::OffsetMap::DumpString()’:
cld2/internal/offsetmap.cc:210:56: warning: array subscript has type ‘char’ [-Wchar-subscripts]
fprintf(stderr, "%c%02d ", "&=+-"[OpPart(diffs_[i])], LenPart(diffs_[i]));
^
cld2/internal/offsetmap.cc: In member function ‘bool CLD2::OffsetMap::MoveLeft()’:
cld2/internal/offsetmap.cc:404:8: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
bool retval = true;
^
cld2/internal/offsetmap.cc: In static member function ‘static bool CLD2::OffsetMap::CopyInserts(CLD2::OffsetMap*, CLD2::OffsetMap*)’:
cld2/internal/offsetmap.cc:484:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (ok && (source->next_diff_sub_ != source->diffs_.size())) {
^
cld2/internal/offsetmap.cc: In static member function ‘static bool CLD2::OffsetMap::CopyDeletes(CLD2::OffsetMap*, CLD2::OffsetMap*)’:
cld2/internal/offsetmap.cc:498:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (ok && (source->next_diff_sub_ != source->diffs_.size())) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cld2/internal/utf8statetable.cc: In function ‘int CLD2::UTF8GenericReplaceInternalTwoByte(const UTF8ReplaceObj_2*, const StringPiece&, StringPiece&, bool, int*, int*, int*, CLD2::OffsetMap*)’:
cld2/internal/utf8statetable.cc:933:7: warning: variable ‘src_lll’ set but not used [-Wunused-but-set-variable]
int src_lll = srclimit - src;
^
cld2/internal/utf8statetable.cc:934:7: warning: variable ‘dst_lll’ set but not used [-Wunused-but-set-variable]
int dst_lll = dstlimit - dst;
^
cld2/internal/utf8statetable.cc: At global scope:
cld2/internal/utf8statetable.cc:179:13: warning: ‘bool CLD2::IsPropObj(const CLD2::UTF8StateMachineObj&)’ defined but not used [-Wunused-function]
static bool IsPropObj(const UTF8StateMachineObj& obj) {
^
cld2/internal/utf8statetable.cc:184:13: warning: ‘bool CLD2::IsPropObj_2(const CLD2::UTF8StateMachineObj_2&)’ defined but not used [-Wunused-function]
static bool IsPropObj_2(const UTF8StateMachineObj_2& obj) {
^
cld2/internal/utf8statetable.cc:189:13: warning: ‘bool CLD2::IsScanObj(const CLD2::UTF8StateMachineObj&)’ defined but not used [-Wunused-function]
static bool IsScanObj(const UTF8StateMachineObj& obj) {
^
cld2/internal/utf8statetable.cc:194:13: warning: ‘bool CLD2::IsReplaceObj(const CLD2::UTF8StateMachineObj&)’ defined but not used [-Wunused-function]
static bool IsReplaceObj(const UTF8StateMachineObj& obj) {
^
cld2/internal/utf8statetable.cc:200:13: warning: ‘bool CLD2::IsReplaceObj_2(const CLD2::UTF8StateMachineObj_2&)’ defined but not used [-Wunused-function]
static bool IsReplaceObj_2(const UTF8StateMachineObj_2& obj) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Traceback (most recent call last):
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/vengine_cpy.py", line 155, in load_library
self.verifier.modulefilename)
File "/home/MYNAME/anaconda3/lib/python3.6/imp.py", line 342, in load_dynamic
return _load(spec)
File "<frozen importlib._bootstrap>", line 675, in _load
File "<frozen importlib._bootstrap>", line 648, in _load_unlocked
File "<frozen importlib._bootstrap>", line 560, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
ImportError: /tmp/pip-build-459t92z6/cld2-cffi/cld2/__pycache__/_cffi__x8faeddebx1977d085.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-459t92z6/cld2-cffi/setup.py", line 191, in <module>
'Topic :: Text Processing :: Linguistic'
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 280, in run
self.find_sources()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 295, in find_sources
mm.run()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 526, in run
self.add_defaults()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 562, in add_defaults
sdist.add_defaults(self)
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 34, in add_defaults
self._add_defaults_python()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/sdist.py", line 133, in _add_defaults_python
build_py = self.get_finalized_command('build_py')
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/setuptools/command/build_py.py", line 34, in finalize_options
orig.build_py.finalize_options(self)
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/command/build_py.py", line 45, in finalize_options
('force', 'force'))
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "/home/MYNAME/anaconda3/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-459t92z6/cld2-cffi/setup.py", line 143, in finalize_options
self.distribution.ext_modules = get_ext_modules()
File "/tmp/pip-build-459t92z6/cld2-cffi/setup.py", line 128, in get_ext_modules
import cld2
File "/tmp/pip-build-459t92z6/cld2-cffi/cld2/__init__.py", line 190, in <module>
extra_compile_args=_COMPILER_ARGS)
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/api.py", line 437, in verify
lib = self.verifier.load_library()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/verifier.py", line 114, in load_library
return self._load_library()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/verifier.py", line 225, in _load_library
return self._vengine.load_library()
File "/home/MYNAME/anaconda3/lib/python3.6/site-packages/cffi/vengine_cpy.py", line 158, in load_library
raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError: importing '/tmp/pip-build-459t92z6/cld2-cffi/cld2/__pycache__/_cffi__x8faeddebx1977d085.cpython-36m-x86_64-linux-gnu.so': /tmp/pip-build-459t92z6/cld2-cffi/cld2/__pycache__/_cffi__x8faeddebx1977d085.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-459t92z6/cld2-cffi/
On windows it works like a charm but on my linux I have this error.
from textacy.
@mosynaq I have GCC 6.3.1, so you could try upgrading it.
from textacy.
@rolando Works like a charm. Thanks for adding it to conda
from textacy.
Related Issues (20)
- UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in Concept HOT 2
- GHSL-2021-109 HOT 1
- ImportError: cannot import name 'keyterms' HOT 1
- Installing textacy on Python 3.6 downgrades the packages HOT 1
- Method to retrieve all words in ConceptNet HOT 1
- normalize_hyphenated_words() not working in version 0.11.0 HOT 1
- Can't Load Russian Language Model due to Caching Bug HOT 4
- Missing SVOTriple returned from subject_verb_object_triples(doc) ? HOT 1
- Missing ARM64 build on conda HOT 2
- most_discriminating_terms no longer available HOT 2
- Why `normalize.hyphenated_words` is not able to reassemble all words separated by a line break? HOT 2
- ERROR: Failed building wheel for pyemd during installation HOT 1
- Incompatible with NetworkX 3.0 HOT 6
- Updating triples.py to rely on spacy-wordnet and sense tagging
- vectorizer = TfidfVectorizer(tokenizer=createTokens) HOT 5
- readthedocs site still has 0.11.0 documentation HOT 2
- Improve quotation detection by parsing quotation mark types
- Quotes - Is there a way to include these additional patterns?
- to_bag_of_terms kwargs like to_bag_of_words
- YAKE favours single terms
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textacy.