Open JimWang151 opened 2 months ago
My python version:3.9.19
Thanks.
@JimWang151 Did you test with different Numpy version? Is your version 1.7.0
? I was running ESPnet2 custom script after GPU drivers upgrade and I could not run it with similar error pertaining to NDARRAY
after upgrading pytorch,python (to 3.9.19) ,tvision,taudio
until I have installed compatible version of Numpy, maybe you could try installing Numpy 1.20.3
as I have in conda. If it won't resolve, try downgrading to your previous version of numpy
with pip
, then ctc_segmentation_dyn.c
needs to be edited - advanced and probably not effective. Did you try pip install --use-pep517
?
@JimWang151 Did you test with different Numpy version? Is your version
1.7.0
? I was running ESPnet2 custom script after GPU drivers upgrade and I could not run it with similar error pertaining toNDARRAY
after upgradingpytorch,python (to 3.9.19) ,tvision,taudio
until I have installed compatible version of Numpy, maybe you could try installingNumpy 1.20.3
as I have in conda. If it won't resolve, try downgrading to your previous version ofnumpy
withpip
, thenctc_segmentation_dyn.c
needs to be edited - advanced and probably not effective. Did you trypip install --use-pep517
?
Thanks for your help.
But after i reinstalled Numpy 1.20.3,it does not work.
_Can u tell me how to edit 'ctc_segmentationdyn.c'?
I advise you wait for developer's answer, never built this software.
My further suggestions:
Try to compile it with mingw-w64
(prolly won't do anything), try numpy 1.21;1.24; 1.19.5
, the culprit could be Cython
works with only old versions of Numpy (specifically its Numpy API) - Cython-Numpy mismatch, pip install --upgrade cython
- another option.
Please provide additional info for devs on Numpy, Pytorch/Torch, Cython versions, compiler setup/flags or in other words, steps to repro like here.
Related links:
https://numpy.org/neps/nep-0053-c-abi-evolution.html#impact-on-cython-users
https://github.com/alekseik1/ifg-py/commit/bd182225719ed4d70f2ba74d0888c4730f116c7a - compatibility matrix
https://github.com/cython/cython/issues/6249
https://github.com/cython/cython/issues/6249#issuecomment-2205735439 - editing ctc_segmentation_dyn.pyx
- adding this line somewhere near the top of the file - probably won't fix and only trigger an error instead of warning
https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table
https://github.com/numpy/numpy/blob/3113704a745e6bb8a3ce7c474ef199ee918e1e81/numpy/_core/code_generators/numpy_api.py
https://numpy.org/doc/stable/reference/c-api/deprecations.html#deprecation-mechanism-npy-no-deprecated-api
https://github.com/h5py/h5py/issues/1538#issuecomment-619285652
I advise you wait for developer's answer, never built this software.
My further suggestions: Try to compile it with
mingw-w64
(prolly won't do anything), trynumpy 1.21;1.24; 1.19.5
, the culprit could beCython
works with only old versions of Numpy (specifically its Numpy API) - Cython-Numpy mismatch,pip install --upgrade cython
- another option.Please provide additional info for devs on Numpy, Pytorch/Torch, Cython versions, compiler setup/flags or in other words, steps to repro like here.
Related links: https://numpy.org/neps/nep-0053-c-abi-evolution.html#impact-on-cython-users alekseik1/ifg-py@bd18222 - compatibility matrix cython/cython#6249 cython/cython#6249 (comment) - editing
ctc_segmentation_dyn.pyx
- adding this line somewhere near the top of the file - probably won't fix and only trigger an error instead of warning https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table https://github.com/numpy/numpy/blob/3113704a745e6bb8a3ce7c474ef199ee918e1e81/numpy/_core/code_generators/numpy_api.py https://numpy.org/doc/stable/reference/c-api/deprecations.html#deprecation-mechanism-npy-no-deprecated-api h5py/h5py#1538 (comment)
Thanks for you help.I will try your suggestion.
This issue can be closed.Thanks again.
Below is the error message:
D:\ProgramData\anaconda3\envs\anitalker\lib\site-packages\setuptools__init__.py:85: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!
!! dist.fetch_build_eggs(dist.setup_requires) D:\ProgramData\anaconda3\envs\anitalker\lib\site-packages\setuptools_distutils\dist.py:268: UserWarning: Unknown distribution option: 'tests_require' warnings.warn(msg) running build running build_py copying ctc_segmentation\ctc_segmentation.py -> build\lib.win32-cpython-39\ctc_segmentation copying ctc_segmentation\partitioning.py -> build\lib.win32-cpython-39\ctc_segmentation copying ctc_segmentation__init__.py -> build\lib.win32-cpython-39\ctc_segmentation running build_ext building 'ctc_segmentation.ctc_segmentation_dyn' extension "d:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\ProgramData\anaconda3\envs\anitalker\lib\site-packages\numpy_core\include -ID:\ProgramData\anaconda3\envs\anitalker\include -ID:\ProgramData\anaconda3\envs\anitalker\Include "-Id:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include" "-Id:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\ATLMFC\include" "-Id:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" /Tcctc_segmentation/ctc_segmentation_dyn.c /Fobuild\temp.win32-cpython-39\Release\ctc_segmentation/ctc_segmentation_dyn.obj ctc_segmentation_dyn.c D:\ProgramData\anaconda3\envs\anitalker\lib\site-packages\numpy_core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION ctc_segmentation/ctc_segmentation_dyn.c(3726): error C2039: "subarray": 不是 "_PyArray_Descr" 的成员 D:\ProgramData\anaconda3\envs\anitalker\lib\site-packages\numpy_core\include\numpy\ndarraytypes.h(618): note: 参见“_PyArray_Descr”的声明 ctc_segmentation/ctc_segmentation_dyn.c(3726): error C2198: “_Py_INCREF”: 用于调用的参数太少 ctc_segmentation/ctc_segmentation_dyn.c(3727): error C2039: "subarray": 不是 "_PyArray_Descr" 的成员 D:\ProgramData\anaconda3\envs\anitalker\lib\site-packages\numpy_core\include\numpy\ndarraytypes.h(618): note: 参见“_PyArray_Descr”的声明 ctc_segmentation/ctc_segmentation_dyn.c(4870): warning C4244: “=”: convert from“double”to“float”,maybe miss data error: command 'd:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x86\cl.exe' failed with exit code 2