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

Debian 12 install fail #563

Closed
SoftwareLiteracy opened this issue Jan 29, 2025 · 4 comments · Fixed by #564
Closed

Debian 12 install fail #563

SoftwareLiteracy opened this issue Jan 29, 2025 · 4 comments · Fixed by #564

Comments

@SoftwareLiteracy
Copy link

Hi, I tried both a pypi and github install, both fail. The install commands are:

python -m pip install pycortex --target=$PYTHON_SITE_PACKAGES/ --upgrade

python -m pip install git+https://github.com/gallantlab/pycortex.git --target=$PYTHON_SITE_PACKAGES/ --upgrade

The system is:

Linux xxx 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

> python --version
Python 3.13.1

Excerpt of the error:

  Building wheel for pycortex (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pycortex (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [593 lines of output]
      running bdist_wheel

...

      /home/xxx/apps/Python-3.13.1/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 pycortex
Failed to build pycortex

Thank you.

@mvdoc
Copy link
Contributor

mvdoc commented Jan 29, 2025 via email

@SoftwareLiteracy
Copy link
Author

Thanks for the feedback.

Downgrading is a step back I'm not invested in for a single dependency. Please let us know when you feel these are supported. Thank you.

> gcc --version
gcc (Debian 12.2.0-14) 12.2.0

> python --version
Python 3.13.1

@kroq-gar78
Copy link
Contributor

kroq-gar78 commented Feb 6, 2025

This looks like a Python 3.13 problem. I think we'll need to update to Cython 3.x to solve this, since I don't see the relevant commit on the 0.29.x branch that we're still using. cython/cython#5997

Log with the specific error:

| Building wheels for collected packages: pycortex
|   Building editable for pycortex (pyproject.toml) ... error
|   error: subprocess-exited-with-error
|
|   × Building editable for pycortex (pyproject.toml) did not run successfully.
|   │ exit code: 1

[...]

|       cortex/openctm.c: In function ‘__Pyx_PyInt_As_int’:
|       cortex/openctm.c:12029:27: error: too few arguments to function ‘_PyLong_AsByteArray’
|       12029 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
|             |                           ^~~~~~~~~~~~~~~~~~~
|       In file included from /usr/local/include/python3.13/longobject.h:107,
|                        from /usr/local/include/python3.13/Python.h:81,
|                        from cortex/openctm.c:54:
|       /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
|         111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
|             |                 ^~~~~~~~~~~~~~~~~~~
|       cortex/openctm.c: In function ‘__Pyx_PyInt_As_CTMenum’:
|       cortex/openctm.c:12225:27: error: too few arguments to function ‘_PyLong_AsByteArray’
|       12225 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
|             |                           ^~~~~~~~~~~~~~~~~~~
|       /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
|         111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
|             |                 ^~~~~~~~~~~~~~~~~~~
|       cortex/openctm.c: In function ‘__Pyx_PyInt_As_unsigned_int’:
|       cortex/openctm.c:12497:27: error: too few arguments to function ‘_PyLong_AsByteArray’
|       12497 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
|             |                           ^~~~~~~~~~~~~~~~~~~
|       /usr/local/include/python3.13/cpython/longobject.h:111:17: note: declared here
|         111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
|             |                 ^~~~~~~~~~~~~~~~~~~
|       cortex/openctm.c: In function ‘__Pyx_PyInt_As_long’:
|       cortex/openctm.c:12693:27: error: too few arguments to function ‘_PyLong_AsByteArray’
|       12693 |                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
|             |                           ^~~~~~~~~~~~~~~~~~~
|       /usr/local/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]

@mvdoc
Copy link
Contributor

mvdoc commented Feb 7, 2025

@SoftwareLiteracy , thanks to @kroq-gar78's fixes you should be able to install pycortex in Python 3.13. I will release a new pycortex version on pypi soon, but in the meanwhile you can try installing directly from the repo on github. Please feel free to reopen this issue if there are still issues.

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

Successfully merging a pull request may close this issue.

3 participants