cld2-cffi dependency #5

Closed
gryBox opened this Issue Mar 20, 2016 · 37 comments

Comments

Projects
None yet
@gryBox

gryBox commented Mar 20, 2016

Hi - I am in the process of pip install -U textacy. There are 2 errors (I believe). Both arise from the mix between my environment and the cld2-cffi package.

Problems and What I tried

  • textacy fails to install with the cld2-cffi dependency.

So I tried to do a pip install cld2-cffi before making another attempt.

  • pip does not install the latest package. It installs version 0.1.1. This seems to be a release error on the cld2-cffi side.

So then I tried to pip install --upgrade 'https://github.com//GregBowyer/cld2-cffi/zipball/master - Since I saw some documentation cld2-cffi was updated 20 days ago , being tested with python 3.5 and released as 0.1.2

  • cld2-cffi again failed to install. Same type of error as the 0.1.1 version.

The issue seems to be C related. As best I can tell.

Questions

  • How dependent is textacy on cld2-cffi?
  • How hard would it for me to do a pull, and remove the dependency (for myself)?

My Environment

  • Window 7 64
  • '3.5.1 |Anaconda 2.5.0 (64-bit)| (default, Jan 29 2016, 15:01:46) [MSC v.1900 64 bit (AMD64)]'

Seems like a really nice package(textacy) :)

thanks

@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Mar 20, 2016

Member

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. :)

Member

bdewilde commented Mar 20, 2016

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. :)

@gryBox

This comment has been minimized.

Show comment
Hide comment
@gryBox

gryBox Mar 20, 2016

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.

gryBox commented Mar 20, 2016

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.

@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Mar 23, 2016

Member

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!

Member

bdewilde commented Mar 23, 2016

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!

@bdewilde bdewilde closed this Mar 24, 2016

@gryBox

This comment has been minimized.

Show comment
Hide comment
@gryBox

gryBox Mar 26, 2016

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 notifications@github.com
wrote:

Closed #5 #5.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#5 (comment)

gryBox commented Mar 26, 2016

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 notifications@github.com
wrote:

Closed #5 #5.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#5 (comment)

@gryBox

This comment has been minimized.

Show comment
Hide comment
@gryBox

gryBox Mar 26, 2016

:) It worked. Thank you for the step by step.

Have you heard back from the cld2-cffi folks?
No.

gryBox commented Mar 26, 2016

:) It worked. Thank you for the step by step.

Have you heard back from the cld2-cffi folks?
No.

@Ares513

This comment has been minimized.

Show comment
Hide comment
@Ares513

Ares513 Jun 21, 2016

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.

Ares513 commented Jun 21, 2016

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.

@gryBox

This comment has been minimized.

Show comment
Hide comment
@gryBox

gryBox Jun 22, 2016

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 notifications@github.com 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
.

gryBox commented Jun 22, 2016

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 notifications@github.com 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
.

@saulshanabrook

This comment has been minimized.

Show comment
Hide comment
@saulshanabrook

saulshanabrook Oct 26, 2016

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?

saulshanabrook commented Oct 26, 2016

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?

@saulshanabrook

This comment has been minimized.

Show comment
Hide comment
@saulshanabrook

saulshanabrook Oct 26, 2016

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

saulshanabrook commented Oct 26, 2016

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
@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Oct 26, 2016

Member

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.

Member

bdewilde commented Oct 26, 2016

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.

@saulshanabrook

This comment has been minimized.

Show comment
Hide comment
@saulshanabrook

saulshanabrook Oct 26, 2016

@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

@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
@GregBowyer

This comment has been minimized.

Show comment
Hide comment
@GregBowyer

GregBowyer Oct 26, 2016

Contributor

I keep meaning to publish this dep as a python many wheels which would make this problem go away for people.

Contributor

GregBowyer commented Oct 26, 2016

I keep meaning to publish this dep as a python many wheels which would make this problem go away for people.

@JonathanReeve

This comment has been minimized.

Show comment
Hide comment
@JonathanReeve

JonathanReeve Dec 3, 2016

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.

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.

@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Dec 3, 2016

Member

@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...

Member

bdewilde commented Dec 3, 2016

@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...

@JonathanReeve

This comment has been minimized.

Show comment
Hide comment
@JonathanReeve

JonathanReeve Dec 3, 2016

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.

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.

@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Dec 3, 2016

Member

I just installed from scratch on macOS, and everything went as expected. Sorry I can't reproduce or assist with this.

Member

bdewilde commented Dec 3, 2016

I just installed from scratch on macOS, and everything went as expected. Sorry I can't reproduce or assist with this.

@JonathanReeve

This comment has been minimized.

Show comment
Hide comment
@JonathanReeve

JonathanReeve Dec 3, 2016

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

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
@JonathanReeve

This comment has been minimized.

Show comment
Hide comment
@JonathanReeve

JonathanReeve Dec 7, 2016

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

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
@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Dec 7, 2016

Member

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!

Member

bdewilde commented Dec 7, 2016

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!

@JonathanReeve

This comment has been minimized.

Show comment
Hide comment
@JonathanReeve

JonathanReeve Dec 7, 2016

Cool! And no worries! I'm psyched to be able to install textacy now and mess around with it.

Cool! And no worries! I'm psyched to be able to install textacy now and mess around with it.

@ranka47

This comment has been minimized.

Show comment
Hide comment
@ranka47

ranka47 Jan 30, 2017

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.

ranka47 commented Jan 30, 2017

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.

@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde Jan 30, 2017

Member

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.

Member

bdewilde commented Jan 30, 2017

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.

@ranka47

This comment has been minimized.

Show comment
Hide comment
@ranka47

ranka47 Jan 30, 2017

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,

ranka47 commented Jan 30, 2017

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,

@terratenney

This comment has been minimized.

Show comment
Hide comment
@terratenney

terratenney Jan 30, 2017

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.

terratenney commented Jan 30, 2017

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.

@ranka47

This comment has been minimized.

Show comment
Hide comment
@ranka47

ranka47 Jan 30, 2017

@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.

ranka47 commented Jan 30, 2017

@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.

@rmax

This comment has been minimized.

Show comment
Hide comment
@rmax

rmax Feb 15, 2017

Contributor

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.

Contributor

rmax commented Feb 15, 2017

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.

@GregBowyer

This comment has been minimized.

Show comment
Hide comment
@GregBowyer

GregBowyer Feb 15, 2017

Contributor

Ah nice thanks for the conda packaging

Contributor

GregBowyer commented Feb 15, 2017

Ah nice thanks for the conda packaging

@rmax

This comment has been minimized.

Show comment
Hide comment
@rmax

rmax Feb 15, 2017

Contributor

@GregBowyer my pleasure. Feel free to comment in the PR if you want to be added as recipe maintainer for cld2-cffi or textacy.

Contributor

rmax commented Feb 15, 2017

@GregBowyer my pleasure. Feel free to comment in the PR if you want to be added as recipe maintainer for cld2-cffi or textacy.

@GregBowyer

This comment has been minimized.

Show comment
Hide comment
@GregBowyer

GregBowyer Feb 17, 2017

Contributor
Contributor

GregBowyer commented Feb 17, 2017

@rubik

This comment has been minimized.

Show comment
Hide comment
@rubik

rubik Apr 25, 2017

Finally a workaround: CFLAGS="-Wno-narrowing" pip install cld2-cffi works. Thanks to fanovpn for posting it on the cld2-cffi issue.

rubik commented Apr 25, 2017

Finally a workaround: CFLAGS="-Wno-narrowing" pip install cld2-cffi works. Thanks to fanovpn for posting it on the cld2-cffi issue.

@mosynaq

This comment has been minimized.

Show comment
Hide comment
@mosynaq

mosynaq May 10, 2017

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
    
    ----------------------------------------

mosynaq commented May 10, 2017

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
    
    ----------------------------------------

@bdewilde

This comment has been minimized.

Show comment
Hide comment
@bdewilde

bdewilde May 10, 2017

Member

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.

Member

bdewilde commented May 10, 2017

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.

@mosynaq

This comment has been minimized.

Show comment
Hide comment
@mosynaq

mosynaq May 10, 2017

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.

mosynaq commented May 10, 2017

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.

@rubik

This comment has been minimized.

Show comment
Hide comment
@rubik

rubik May 10, 2017

@mosynaq I have GCC 6.3.1, so you could try upgrading it.

rubik commented May 10, 2017

@mosynaq I have GCC 6.3.1, so you could try upgrading it.

@rmax

This comment has been minimized.

Show comment
Hide comment
@rmax

rmax May 11, 2017

Contributor

@mosynaq If you are using conda try: conda install -c conda-forge cld2-cffi

Contributor

rmax commented May 11, 2017

@mosynaq If you are using conda try: conda install -c conda-forge cld2-cffi

@nigeljyng

This comment has been minimized.

Show comment
Hide comment
@nigeljyng

nigeljyng May 24, 2017

@rolando Works like a charm. Thanks for adding it to conda

@rolando Works like a charm. Thanks for adding it to conda

@rbhambriiit

This comment has been minimized.

Show comment
Hide comment
@rbhambriiit

rbhambriiit Feb 26, 2018

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment