Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

thinc version 8.2.5 causing installation errors #942

Closed
znadrich-qf opened this issue Jun 20, 2024 · 2 comments
Closed

thinc version 8.2.5 causing installation errors #942

znadrich-qf opened this issue Jun 20, 2024 · 2 comments

Comments

@znadrich-qf
Copy link

How to reproduce the behaviour

We started experiencing installation errors overnight when thinc updated from version 8.2.4 to 8.2.5

python -m venv --copies test_env
source test_env/bin/activate
pip3 install -U pip setuptools==60.2.0 wheel==0.37.1 setuptools_scm==6.3.2 venv-pack==0.2.0
pip3 install thinc==8.2.5 spacy==3.7.4
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-lf31pxs_/overlay/lib/python3.8/site-packages/numpy/core/include -I/usr/include/python3.8 -I/home/zack/test_env/include -I/usr/include/python3.8 -c thinc/backends/cblas.cpp -o build/temp.linux-x86_64-cpython-38/thinc/backends/cblas.o -O3 -Wno-strict-prototypes -Wno-unused-function -std=c++11
      cc1plus: warning: command-line option ‘-Wno-strict-prototypes’ is valid for C/ObjC but not for C++
      thinc/backends/cblas.cpp:24:10: fatal error: Python.h: No such file or directory
         24 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      /tmp/pip-build-env-lf31pxs_/overlay/lib/python3.8/site-packages/setuptools/command/build_py.py:215: _Warning: Package 'thinc.tests.mypy.configs' is absent from the `packages` configuration.
      !!

              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'thinc.tests.mypy.configs' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'thinc.tests.mypy.configs' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'thinc.tests.mypy.configs' to be distributed and are
              already explicitly excluding 'thinc.tests.mypy.configs' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      /tmp/pip-build-env-lf31pxs_/overlay/lib/python3.8/site-packages/setuptools/command/build_py.py:215: _Warning: Package 'thinc.tests.mypy.outputs' is absent from the `packages` configuration.
      !!

              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'thinc.tests.mypy.outputs' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'thinc.tests.mypy.outputs' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'thinc.tests.mypy.outputs' to be distributed and are
              already explicitly excluding 'thinc.tests.mypy.outputs' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for thinc
Failed to build thinc
ERROR: Could not build wheels for thinc, which is required to install pyproject.toml-based projects

Your Environment

  • Operating System: Ubuntu 22.04.4 LTS
  • Python Version Used: 3.8.16
  • Thinc Version Used: 8.2.5
  • Environment Information: spacy==3.7.4, thinc==8.2.5
@znadrich-qf
Copy link
Author

We fixed this by installed python 3.8 headers

@honnibal
Copy link
Member

honnibal commented Jun 20, 2024

The underlying issue really is that you shouldn't need to compile it.

We've stopped building wheels for older Python versions because there's just so many Python versions now and the build matrix across (Python, OS, arch) gets too big.

Are you able to switch to Python 3.10?

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

No branches or pull requests

2 participants