I'm working on a project that uses the python library Pycodec2 in order for the
library to work it needs codec2 installed. The issue I'm having is when I try to build/install the library I'm getting this error below.
我正在进行一个项目,该项目使用了Python库Pycodec2,为了使该库工作,它需要安装codec2。我遇到的问题是,当我尝试构建/安装库时,我收到了下面的错误。
pacman -S codec2
吃豆人-S编解码器2
pip install pycodec2 / same issue if I use python setup.py install
PIP安装pycodec2/如果我使用python setup.py安装,也会出现同样的问题
Collecting pycodec2
Using cached pycodec2-2.1.0.tar.gz (62 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pycodec2
Building wheel for pycodec2 (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pycodec2 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building 'pycodec2' extension
error: unknown file type '.pxd' (from 'pycodec2/codec2.pxd')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycodec2
Failed to build pycodec2
ERROR: Could not build wheels for pycodec2, which is required to install pyproject.toml-based projects
<------- Some Guy on GitHub has the same issue ------->
https://github.com/gregorias/pycodec2
pip installed the following
"numpy",
"setuptools",
"wheel",
"Cython"
PIP安装了以下“NumPy”、“setupTools”、“车轮”、“Cython”
I know codec2 is installed
我知道已经安装了Codec2
pacman -Ql codec2
codec2 /usr/
codec2 /usr/bin/
codec2 /usr/bin/c2ch
codec2 /usr/bin/c2dec
codec2 /usr/bin/c2demo
codec2 /usr/bin/c2enc
codec2 /usr/bin/c2sim
codec2 /usr/bin/cohpsk_demod
codec2 /usr/bin/cohpsk_get_test_bits
codec2 /usr/bin/cohpsk_mod
codec2 /usr/bin/cohpsk_put_test_bits
codec2 /usr/bin/fdmdv_demod
codec2 /usr/bin/fdmdv_get_test_bits
codec2 /usr/bin/fdmdv_mod
codec2 /usr/bin/fdmdv_put_test_bits
codec2 /usr/bin/freedv_rx
codec2 /usr/bin/freedv_tx
codec2 /usr/bin/fsk_demod
codec2 /usr/bin/fsk_get_test_bits
codec2 /usr/bin/fsk_mod
codec2 /usr/bin/fsk_mod_ext_vco
codec2 /usr/bin/fsk_put_test_bits
codec2 /usr/bin/ldpc_dec
codec2 /usr/bin/ldpc_enc
codec2 /usr/bin/ldpc_noise
codec2 /usr/bin/ofdm_demod
codec2 /usr/bin/ofdm_get_test_bits
codec2 /usr/bin/ofdm_mod
codec2 /usr/bin/ofdm_put_test_bits
codec2 /usr/include/
codec2 /usr/include/codec2/
codec2 /usr/include/codec2/codec2.h
codec2 /usr/include/codec2/codec2_cohpsk.h
codec2 /usr/include/codec2/codec2_fdmdv.h
codec2 /usr/include/codec2/codec2_fifo.h
codec2 /usr/include/codec2/codec2_fm.h
codec2 /usr/include/codec2/codec2_math.h
codec2 /usr/include/codec2/codec2_ofdm.h
codec2 /usr/include/codec2/comp.h
codec2 /usr/include/codec2/freedv_api.h
codec2 /usr/include/codec2/fsk.h
codec2 /usr/include/codec2/modem_stats.h
codec2 /usr/include/codec2/reliable_text.h
codec2 /usr/include/codec2/version.h
codec2 /usr/lib/
codec2 /usr/lib/cmake/
codec2 /usr/lib/cmake/codec2/
codec2 /usr/lib/cmake/codec2/codec2-config-none.cmake
codec2 /usr/lib/cmake/codec2/codec2-config.cmake
codec2 /usr/lib/libcodec2.so
codec2 /usr/lib/libcodec2.so.1.1
codec2 /usr/lib/pkgconfig/
codec2 /usr/lib/pkgconfig/codec2.pc
ran this cythonize -i codec2.pxd
to see what the setup.py was doing
and go the same error bellow
运行cythonize-I codec2.pxd以查看setup.py正在做什么,并执行相同的错误如下
error: unknown file type '.pxd' (from
'/home/XX0XX/dev/pycodec2-main/pycodec2/codec2.pxd')
Some help finding out why I'm getting this error would be great
error: unknown file type '.pxd' (from 'pycodec2/codec2.pxd')
一些帮助找出为什么我收到此错误将是大错误:未知的文件类型‘.pxd’(来自‘pycodec2/codec2.pxd’)
Also, I tried installing the same library on Alma Linux got the same error.
此外,我试图在Alma Linux上安装相同的库,但得到了相同的错误。
THANKS
谢谢
更多回答
looks like the setup.py should be only cythonize pycodec2.pyx not the .pdx Testing ......
看起来setup.py应该只是cythonize pycodec2.pyx,而不是.pdx测试......
OK looks like removing line 10 of the setup.py --> "pycodec2/codec2.pxd" might fix the issue
OK看起来删除setup.py-->“pycodec 2/codec2.pxd”的第10行可能会解决这个问题
我是一名优秀的程序员,十分优秀!