You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
When attempting to install the ldpc package on macOS with Python 3.12.3 and Numpy 2.0.1, the installation fails due to multiple Cython compilation errors. The errors occur specifically when the installation process attempts to build the wheel for ldpc.
Below is the relevant portion of the output:
pip install ldpc
Collecting ldpc
Using cached ldpc-0.1.51.tar.gz (367 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [111 lines of output]
Error compiling Cython file:
------------------------------------------------------------
...
cdef char* numpy2char(np_array,char* char_array)
cdef char* spmatrix2char(matrix,char* char_array)
cdef double* numpy2double(np.ndarray[np.float_t, ndim=1] np_array,double* double_array)
cdef np.ndarray[np.int_t, ndim=1] char2numpy(char* char_array, int n)
^
------------------------------------------------------------
src/ldpc/c_util.pxd:11:19: Invalid type.
Error compiling Cython file:
------------------------------------------------------------
...
from ldpc.c_util cimport numpy2double,numpy2char,char2numpy,double2numpy
^
------------------------------------------------------------
src/ldpc/mod2sparse.pxd:6:0: 'ldpc/c_util/char2numpy.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from ldpc.c_util cimport numpy2double,numpy2char,char2numpy,double2numpy
^
------------------------------------------------------------
src/ldpc/mod2sparse.pxd:6:0: 'ldpc/c_util/double2numpy.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
cpdef np.ndarray[np.int_t, ndim=1] mul(self, np.ndarray[np.int_t, ndim=1] vector)
^
------------------------------------------------------------
src/ldpc/mod2sparse.pxd:80:24: Invalid type.
Error compiling Cython file:
------------------------------------------------------------
...
cpdef np.ndarray[np.int_t, ndim=1] decode(self, input_vector)
^
------------------------------------------------------------
src/ldpc/bp_decoder.pxd:32:24: Invalid type.
Error compiling Cython file:
------------------------------------------------------------
...
cpdef np.ndarray[np.int_t, ndim=1] decode(self, input_vector):
^
------------------------------------------------------------
src/ldpc/bp_decoder.pyx:122:24: Invalid type.
Compiling src/ldpc/bp_decoder.pyx because it changed.
Compiling src/ldpc/mod2sparse.pyx because it changed.
Compiling src/ldpc/c_util.pyx because it changed.
Compiling src/ldpc/osd.pyx because it changed.
[1/4] Cythonizing src/ldpc/bp_decoder.pyx
Traceback (most recent call last):
...
Cython.Compiler.Errors.CompileError: src/ldpc/bp_decoder.pyx
[end of output]
Steps to Reproduce:
Set up a virtual environment on macOS with Python 3.12.3.
Install Numpy 2.0.1 using pip.
Attempt to install the ldpc package using pip.
Environment:
Operating System: macOS
Python Version: 3.12.3
Numpy Version: 2.0.1
ldpc Version: 0.1.51
Expected Behavior:
The installation process should successfully build and install the ldpc package without errors.
Actual Behavior:
The installation process fails during the wheel build for ldpc, leading to a failed installation.
Errors Encountered:
Invalid Type Errors: Multiple occurrences of "Invalid type" errors in Cython files such as src/ldpc/c_util.pxd, src/ldpc/mod2sparse.pxd, src/ldpc/bp_decoder.pxd, and src/ldpc/bp_decoder.pyx.
Missing Files: The Cython compiler reports missing files: 'ldpc/c_util/char2numpy.pxd' and 'ldpc/c_util/double2numpy.pxd'.
Traceback: The compilation process eventually fails with a Cython.Compiler.Errors.CompileError on src/ldpc/bp_decoder.pyx.
Suggestion:
It would be beneficial to review the Cython files and dependencies to ensure compatibility with the latest Python and Numpy versions. Additionally, if ldpc is not critical to the core functionality, consider making it an optional dependency, or provide pre-built wheels for macOS to avoid these issues.
Additional Information:
The issue may be specific to the setup on macOS with the mentioned versions. The error messages suggest that the problem lies in the Cython code of ldpc, potentially due to missing or incompatible files.
A similar issue was encountered when trying to install the mqt.qecc package, which also depends on ldpc.
The text was updated successfully, but these errors were encountered:
Hi. We are currently working on a v2 of this package that will be merged into this main repository shortly. Could you check whehter the problem persistis in ldpc_V2?
Description:
When attempting to install the
ldpc
package on macOS with Python 3.12.3 and Numpy 2.0.1, the installation fails due to multiple Cython compilation errors. The errors occur specifically when the installation process attempts to build the wheel forldpc
.Below is the relevant portion of the output:
Steps to Reproduce:
ldpc
package using pip.Environment:
Expected Behavior:
The installation process should successfully build and install the
ldpc
package without errors.Actual Behavior:
The installation process fails during the wheel build for
ldpc
, leading to a failed installation.Errors Encountered:
src/ldpc/c_util.pxd
,src/ldpc/mod2sparse.pxd
,src/ldpc/bp_decoder.pxd
, andsrc/ldpc/bp_decoder.pyx
.'ldpc/c_util/char2numpy.pxd'
and'ldpc/c_util/double2numpy.pxd'
.Cython.Compiler.Errors.CompileError
onsrc/ldpc/bp_decoder.pyx
.Suggestion:
It would be beneficial to review the Cython files and dependencies to ensure compatibility with the latest Python and Numpy versions. Additionally, if
ldpc
is not critical to the core functionality, consider making it an optional dependency, or provide pre-built wheels for macOS to avoid these issues.Additional Information:
ldpc
, potentially due to missing or incompatible files.mqt.qecc
package, which also depends onldpc
.The text was updated successfully, but these errors were encountered: