imagededup
imagededup copied to clipboard
Doesnt work in python3.12
I am trying to install imagededup on python 3.12 , it is unable to build the wheel citing version difference issue .
Can you provide the full stack-trace error ? I might have the same issue and I don't want to create a dupe issue
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
Support added with new release.