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

Need a wheel for python 3.13 #3601

Open
mistahanish opened this issue Feb 10, 2025 · 4 comments
Open

Need a wheel for python 3.13 #3601

mistahanish opened this issue Feb 10, 2025 · 4 comments

Comments

@mistahanish
Copy link

mistahanish commented Feb 10, 2025

When I am trying to install gensim with python 3.13, scipy is having trouble installing because it is trying to compile a new wheel but is unable to.

@piskvorky
Copy link
Owner

@mpenkov Misha how about a quick session for another release?

Or maybe just release the new wheels into the existing release? Because I don't think we've merged a single PR since the last one.

@mpenkov
Copy link
Collaborator

mpenkov commented Feb 14, 2025

I think it's simpler to make a new release (maybe a bugfix one) than to create wheels for an existing release, because of the way the wheel builder is set up.

@mpenkov
Copy link
Collaborator

mpenkov commented Feb 14, 2025

Unfortunately, since we've made the previous release, github has gone and deprecated the macos-12 workers: actions/runner-images#10721

The macos-14 workers appear to build the wheel, but then it fails to install: https://github.com/piskvorky/gensim/actions/runs/13274964157/job/37064784796

If someone is able to debug this problem, that'd be helpful, because at the moment we don't have a building wheel for macos.

I'll work on adding Py3.13 support in the meanwhile.

@mpenkov
Copy link
Collaborator

mpenkov commented Feb 14, 2025

This issue appears to be blocking Py3.13 builds for us:

2025-02-14T14:47:33.4599512Z   gensim/models/word2vec_inner.c:10388:51: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘fields’
2025-02-14T14:47:33.4602738Z   10388 |     __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 851, __pyx_L1_error)
2025-02-14T14:47:33.4605387Z         |                                                   ^~
2025-02-14T14:47:33.4629253Z   gensim/models/word2vec_inner.c:10589:79: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
2025-02-14T14:47:33.4632343Z   10589 |     (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
2025-02-14T14:47:33.4636718Z         |                                                                               ^~
2025-02-14T14:47:33.5046471Z   gensim/models/word2vec_inner.c: In function ‘__Pyx_PyInt_As_PY_LONG_LONG’:
2025-02-14T14:47:33.5061022Z   gensim/models/word2vec_inner.c:14538:27: error: too few arguments to function ‘_PyLong_AsByteArray’
2025-02-14T14:47:33.5063779Z   14538 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
2025-02-14T14:47:33.5066796Z         |                           ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5071044Z   In file included from /opt/_internal/cpython-3.13.0/include/python3.13/longobject.h:107,
2025-02-14T14:47:33.5074173Z                    from /opt/_internal/cpython-3.13.0/include/python3.13/Python.h:81,
2025-02-14T14:47:33.5076818Z                    from gensim/models/word2vec_inner.c:25:
2025-02-14T14:47:33.5079585Z   /opt/_internal/cpython-3.13.0/include/python3.13/cpython/longobject.h:111:17: note: declared here
2025-02-14T14:47:33.5081804Z     111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
2025-02-14T14:47:33.5083978Z         |                 ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5090146Z   gensim/models/word2vec_inner.c: In function ‘__Pyx_PyInt_As_int’:
2025-02-14T14:47:33.5107617Z   gensim/models/word2vec_inner.c:14772:27: error: too few arguments to function ‘_PyLong_AsByteArray’
2025-02-14T14:47:33.5109469Z   14772 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
2025-02-14T14:47:33.5112060Z         |                           ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5115713Z   In file included from /opt/_internal/cpython-3.13.0/include/python3.13/longobject.h:107,
2025-02-14T14:47:33.5118138Z                    from /opt/_internal/cpython-3.13.0/include/python3.13/Python.h:81,
2025-02-14T14:47:33.5120302Z                    from gensim/models/word2vec_inner.c:25:
2025-02-14T14:47:33.5123285Z   /opt/_internal/cpython-3.13.0/include/python3.13/cpython/longobject.h:111:17: note: declared here
2025-02-14T14:47:33.5125320Z     111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
2025-02-14T14:47:33.5128014Z         |                 ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5135053Z   gensim/models/word2vec_inner.c: In function ‘__Pyx_PyInt_As_unsigned_PY_LONG_LONG’:
2025-02-14T14:47:33.5152915Z   gensim/models/word2vec_inner.c:14968:27: error: too few arguments to function ‘_PyLong_AsByteArray’
2025-02-14T14:47:33.5156250Z   14968 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
2025-02-14T14:47:33.5158663Z         |                           ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5162697Z   In file included from /opt/_internal/cpython-3.13.0/include/python3.13/longobject.h:107,
2025-02-14T14:47:33.5165738Z                    from /opt/_internal/cpython-3.13.0/include/python3.13/Python.h:81,
2025-02-14T14:47:33.5168987Z                    from gensim/models/word2vec_inner.c:25:
2025-02-14T14:47:33.5171058Z   /opt/_internal/cpython-3.13.0/include/python3.13/cpython/longobject.h:111:17: note: declared here
2025-02-14T14:47:33.5173197Z     111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
2025-02-14T14:47:33.5175080Z         |                 ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5181407Z   gensim/models/word2vec_inner.c: In function ‘__Pyx_PyInt_As_npy_uint32’:
2025-02-14T14:47:33.5200431Z   gensim/models/word2vec_inner.c:15164:27: error: too few arguments to function ‘_PyLong_AsByteArray’
2025-02-14T14:47:33.5201785Z   15164 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
2025-02-14T14:47:33.5203567Z         |                           ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5205917Z   In file included from /opt/_internal/cpython-3.13.0/include/python3.13/longobject.h:107,
2025-02-14T14:47:33.5207799Z                    from /opt/_internal/cpython-3.13.0/include/python3.13/Python.h:81,
2025-02-14T14:47:33.5210359Z                    from gensim/models/word2vec_inner.c:25:
2025-02-14T14:47:33.5212611Z   /opt/_internal/cpython-3.13.0/include/python3.13/cpython/longobject.h:111:17: note: declared here
2025-02-14T14:47:33.5214313Z     111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
2025-02-14T14:47:33.5215611Z         |                 ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5226576Z   gensim/models/word2vec_inner.c: In function ‘__Pyx_PyInt_As_long’:
2025-02-14T14:47:33.5246323Z   gensim/models/word2vec_inner.c:15398:27: error: too few arguments to function ‘_PyLong_AsByteArray’
2025-02-14T14:47:33.5253866Z   15398 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
2025-02-14T14:47:33.5255249Z         |                           ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5256092Z   In file included from /opt/_internal/cpython-3.13.0/include/python3.13/longobject.h:107,
2025-02-14T14:47:33.5257983Z                    from /opt/_internal/cpython-3.13.0/include/python3.13/Python.h:81,
2025-02-14T14:47:33.5267840Z                    from gensim/models/word2vec_inner.c:25:
2025-02-14T14:47:33.5268583Z   /opt/_internal/cpython-3.13.0/include/python3.13/cpython/longobject.h:111:17: note: declared here
2025-02-14T14:47:33.5269110Z     111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
2025-02-14T14:47:33.5269448Z         |                 ^~~~~~~~~~~~~~~~~~~
2025-02-14T14:47:33.5607791Z   error: command '/opt/rh/devtoolset-10/root/usr/bin/gcc' failed with exit code 1
2025-02-14T14:47:33.5958959Z   error: subprocess-exited-with-error
2025-02-14T14:47:33.5959315Z   
2025-02-14T14:47:33.5959881Z   × Building wheel for gensim (pyproject.toml) did not run successfully.
2025-02-14T14:47:33.5960363Z   │ exit code: 1
2025-02-14T14:47:33.5960721Z   ╰─> See above for output.

I can see 3 distinct issues:

  1. error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘fields’
  2. error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
  3. gensim/models/word2vec_inner.c:15398:27: error: too few arguments to function ‘_PyLong_AsByteArray’

Here's a potential fix for the last problem (changed type signature): https://github.com/mkleehammer/pyodbc/pull/1361/files

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