Skip to content

Installation error for python 3.13 #2

@nromashchenko

Description

@nromashchenko

I encountered an error trying to install it under python 3.13.

pip install pyopa

gives:

  error: subprocess-exited-with-error
  
  × Building wheel for pyopa (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [172 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-313/pyopa
      copying pyopa/__init__.py -> build/lib.linux-x86_64-cpython-313/pyopa
      copying pyopa/aligner.py -> build/lib.linux-x86_64-cpython-313/pyopa
      creating build/lib.linux-x86_64-cpython-313/pyopa/backend
      copying pyopa/backend/__init__.py -> build/lib.linux-x86_64-cpython-313/pyopa/backend
      running egg_info
      writing pyopa.egg-info/PKG-INFO
      writing dependency_links to pyopa.egg-info/dependency_links.txt
      writing requirements to pyopa.egg-info/requires.txt
      writing top-level names to pyopa.egg-info/top_level.txt
      dependency /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative
      dependency /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative
      reading manifest file 'pyopa.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'pyopa.egg-info/SOURCES.txt'
      /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/setuptools/command/build_py.py:212: _Warning: Package 'pyopa.matrices' is absent from the `packages` configuration.
      !!
      
              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'pyopa.matrices' 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 'pyopa.matrices' 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 'pyopa.matrices' to be distributed and are
              already explicitly excluding 'pyopa.matrices' 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-een07inu/overlay/lib/python3.13/site-packages/setuptools/command/build_py.py:212: _Warning: Package 'pyopa.matrices.json' is absent from the `packages` configuration.
      !!
      
              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'pyopa.matrices.json' 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 'pyopa.matrices.json' 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 'pyopa.matrices.json' to be distributed and are
              already explicitly excluding 'pyopa.matrices.json' 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)
      creating build/lib.linux-x86_64-cpython-313/pyopa/matrices
      copying pyopa/matrices/jtt.dat -> build/lib.linux-x86_64-cpython-313/pyopa/matrices
      creating build/lib.linux-x86_64-cpython-313/pyopa/matrices/json
      copying pyopa/matrices/json/all_matrices.json -> build/lib.linux-x86_64-cpython-313/pyopa/matrices/json
      copying pyopa/matrices/json/logPAM1.json -> build/lib.linux-x86_64-cpython-313/pyopa/matrices/json
      copying pyopa/matrices/json/logPAM1_unscaled.json -> build/lib.linux-x86_64-cpython-313/pyopa/matrices/json
      copying pyopa/backend/cpyopa.pxd -> build/lib.linux-x86_64-cpython-313/pyopa/backend
      copying pyopa/backend/pyopa.c -> build/lib.linux-x86_64-cpython-313/pyopa/backend
      copying pyopa/backend/pyopa.pyx -> build/lib.linux-x86_64-cpython-313/pyopa/backend
      running build_ext
      building 'pyopa.backend.pyopa' extension
      creating build/temp.linux-x86_64-cpython-313/c_source
      creating build/temp.linux-x86_64-cpython-313/pyopa/backend
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/DynProgr_scalar.c -o build/temp.linux-x86_64-cpython-313/c_source/DynProgr_scalar.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/DynProgr_sse_byte.c -o build/temp.linux-x86_64-cpython-313/c_source/DynProgr_sse_byte.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/DynProgr_sse_double.c -o build/temp.linux-x86_64-cpython-313/c_source/DynProgr_sse_double.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/DynProgr_sse_short.c -o build/temp.linux-x86_64-cpython-313/c_source/DynProgr_sse_short.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/EstimatePam.c -o build/temp.linux-x86_64-cpython-313/c_source/EstimatePam.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/Page_size.c -o build/temp.linux-x86_64-cpython-313/c_source/Page_size.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c c_source/Python_extension.c -o build/temp.linux-x86_64-cpython-313/c_source/Python_extension.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      gcc -pthread -B /home/nikolai/micromamba/envs/tomato/shared/python_compiler_compat -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -O2 -isystem /home/nikolai/micromamba/envs/tomato/include -fPIC -Ic_source/ -I/tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include -I. -I/home/nikolai/micromamba/envs/tomato/include/python3.13 -c pyopa/backend/pyopa.c -o build/temp.linux-x86_64-cpython-313/pyopa/backend/pyopa.o -O2 -DSIMDE_ENABLE_NATIVE_ALIASES
      In file included from /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/ndarraytypes.h:1909,
                       from /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/arrayobject.h:5,
                       from pyopa/backend/pyopa.c:796:
      /tmp/pip-build-env-een07inu/overlay/lib/python3.13/site-packages/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      pyopa/backend/pyopa.c:879:1: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
        879 | static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
            | ^~~~~~
      pyopa/backend/pyopa.c: In function ‘__Pyx_Py_UNICODE_strlen’:
      pyopa/backend/pyopa.c:880:5: warning: ‘Py_UNICODE’ is deprecated [-Wdeprecated-declarations]
        880 |     const Py_UNICODE *u_end = u;
            |     ^~~~~
      pyopa/backend/pyopa.c: In function ‘__Pyx_init_assertions_enabled’:
      pyopa/backend/pyopa.c:1876:39: error: implicit declaration of function ‘_PyInterpreterState_GetConfig’; did you mean ‘PyInterpreterState_GetID’? [-Wimplicit-function-declaration]
       1876 |     __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
            |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                       PyInterpreterState_GetID
      pyopa/backend/pyopa.c:1876:105: error: invalid type argument of ‘->’ (have ‘int’)
       1876 |     __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
            |                                                                                                         ^~
      pyopa/backend/pyopa.c: In function ‘__pyx_pymod_exec_pyopa’:
      pyopa/backend/pyopa.c:2045:38: error: implicit declaration of function ‘_PyDict_SetItem_KnownHash’; did you mean ‘_PyDict_GetItem_KnownHash’? [-Wimplicit-function-declaration]
       2045 |     (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
            |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      pyopa/backend/pyopa.c:18117:7: note: in expansion of macro ‘__Pyx_SetNameInClass’
      18117 |   if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
            |       ^~~~~~~~~~~~~~~~~~~~
      pyopa/backend/pyopa.c: In function ‘__Pyx_PyInt_As_int’:
      pyopa/backend/pyopa.c:22823:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      22823 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
            |                           ^~~~~~~~~~~~~~~~~~~
      In file included from /home/nikolai/micromamba/envs/tomato/include/python3.13/longobject.h:107,
                       from /home/nikolai/micromamba/envs/tomato/include/python3.13/Python.h:81,
                       from pyopa/backend/pyopa.c:44:
      /home/nikolai/micromamba/envs/tomato/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      pyopa/backend/pyopa.c: In function ‘__Pyx_PyInt_As_long’:
      pyopa/backend/pyopa.c:23057:27: error: too few arguments to function ‘_PyLong_AsByteArray’
      23057 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
            |                           ^~~~~~~~~~~~~~~~~~~
      /home/nikolai/micromamba/envs/tomato/include/python3.13/cpython/longobject.h:111:17: note: declared here
        111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
            |                 ^~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/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 pyopa
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyopa)

It works well for python 3.12 though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions