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

Doesnt work in python3.12 #220

Open
Vedanti3o1 opened this issue Sep 2, 2024 · 2 comments
Open

Doesnt work in python3.12 #220

Vedanti3o1 opened this issue Sep 2, 2024 · 2 comments

Comments

@Vedanti3o1
Copy link

I am trying to install imagededup on python 3.12 , it is unable to build the wheel citing version difference issue .

@Mathis-Aubry
Copy link

Can you provide the full stack-trace error ? I might have the same issue and I don't want to create a dupe issue

@GiraudJules
Copy link

Hi, have the same error here.
I can build the package on python 3.11 but not on python 3.12 on macOs.
Don't want to open a dup issue too 😉

Here the full stack-trace error :

× Failed to download and build `imagededup==0.3.1`
  ╰─▶ Build backend failed to build wheel through `build_wheel` (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup
      copying imagededup/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup/methods
      copying imagededup/methods/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/methods
      copying imagededup/methods/cnn.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/methods
      copying imagededup/methods/hashing.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/methods
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      copying imagededup/utils/general_utils.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      copying imagededup/utils/image_utils.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      copying imagededup/utils/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      copying imagededup/utils/logger.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      copying imagededup/utils/plotter.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      copying imagededup/utils/data_generator.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/utils
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup/evaluation
      copying imagededup/evaluation/evaluation.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/evaluation
      copying imagededup/evaluation/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/evaluation
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers
      copying imagededup/handlers/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/metrics
      copying imagededup/handlers/metrics/information_retrieval.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/metrics
      copying imagededup/handlers/metrics/classification.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/metrics
      copying imagededup/handlers/metrics/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/metrics
      creating build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      copying imagededup/handlers/search/bktree.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      copying imagededup/handlers/search/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      copying imagededup/handlers/search/brute_force_cython.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      copying imagededup/handlers/search/brute_force.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      copying imagededup/handlers/search/retrieval.py -> build/lib.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      running build_ext
      building 'brute_force_cython_ext' extension
      creating build/temp.macosx-11.0-arm64-cpython-312/imagededup/handlers/search
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -Werror=unguarded-availability-new -I/Users/jules/.cache/uv/builds-v0/.tmpFc6HFp/include
      -I/Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12 -c imagededup/handlers/search/brute_force_cython_ext.cpp -o build/temp.macosx-11.0-arm64-cpython-312/imagededup/handlers/search/brute_force_cython_ext.o -stdlib=libc++

      [stderr]
      /Users/jules/.cache/uv/builds-v0/.tmpFc6HFp/lib/python3.12/site-packages/setuptools/dist.py:487: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!

              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.

              By 2025-Mar-03, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        opt = self.warn_dash_deprecation(opt, section)
      imagededup/handlers/search/brute_force_cython_ext.cpp:2779:27: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
          return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
                                ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1160:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
      #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                      ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
          Py_DEPRECATED(3.12) uint64_t ma_version_tag;
          ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:2791:36: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
          return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
                                         ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1160:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
      #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                      ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
          Py_DEPRECATED(3.12) uint64_t ma_version_tag;
          ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:2795:56: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
          if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
                                                             ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1160:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
      #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                      ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
          Py_DEPRECATED(3.12) uint64_t ma_version_tag;
          ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:2840:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
              __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
              ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1167:16: note: expanded from macro '__PYX_PY_DICT_LOOKUP_IF_MODIFIED'
          if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
                     ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1160:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
      #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                      ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
          Py_DEPRECATED(3.12) uint64_t ma_version_tag;
          ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:2840:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
              __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
              ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1171:30: note: expanded from macro '__PYX_PY_DICT_LOOKUP_IF_MODIFIED'
              __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
                                   ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:1160:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
      #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                      ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
          Py_DEPRECATED(3.12) uint64_t ma_version_tag;
          ^
      /Users/jules/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3103:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3158:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3299:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3354:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3571:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3626:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3767:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:3822:55: error: no member named 'ob_digit' in '_longobject'
                  const digit* digits = ((PyLongObject*)x)->ob_digit;
                                        ~~~~~~~~~~~~~~~~~~  ^
      imagededup/handlers/search/brute_force_cython_ext.cpp:4273:47: error: no member named 'ob_digit' in '_longobject'
          const digit* digits = ((PyLongObject*)b)->ob_digit;
                                ~~~~~~~~~~~~~~~~~~  ^
      5 warnings and 9 errors generated.
      error: command '/usr/bin/clang++' failed with exit code 1

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

3 participants