asteroid-team / asteroid

The PyTorch-based audio source separation toolkit for researchers
https://asteroid-team.github.io/
MIT License
2.21k stars 419 forks source link

Legacy Install Failure #663

Open Mareentier opened 1 year ago

Mareentier commented 1 year ago

🐛 Bug

I get a legacy install failure when installing asteroid by pip.

I want to install asteroid by using pip in my CMD(python version 3.11.3) , later I tried it also in conda in an environment with an older python version (3.8) I already updatet Visual Studio, installed Visual Studio Build Tools, I already installed wheel by pip, I already tried to install pesq but it outputs the same error. I would be very happy if I could use your package. I need it for my thesis and I have time pressure. Can please anyone help me?

This is the complete output:

` (my_env_asteroid) C:\Users\franc>pip install asteroid Collecting asteroid Using cached asteroid-0.6.0-py3-none-any.whl (246 kB) Requirement already satisfied: numpy>=1.16.4 in c:\users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages (from asteroid) (1.24.2) Collecting pytorch-lightning>=1.5.0 Using cached pytorch_lightning-2.0.1.post0-py3-none-any.whl (718 kB) Collecting pb-bss-eval>=0.0.2 Using cached pb_bss_eval-0.0.2-py3-none-any.whl (14 kB) Collecting PyYAML>=5.0 Using cached PyYAML-6.0-cp38-cp38-win_amd64.whl (155 kB) Collecting torch-stoi>=0.1.2 Using cached torch_stoi-0.1.2-py3-none-any.whl Collecting julius Using cached julius-0.2.7-py3-none-any.whl Collecting asteroid-filterbanks>=0.4.0 Using cached asteroid_filterbanks-0.4.0-py3-none-any.whl (29 kB) Collecting scipy>=1.1.0 Using cached scipy-1.10.1-cp38-cp38-win_amd64.whl (42.2 MB) Collecting torchaudio>=0.5.0 Using cached torchaudio-2.0.1-cp38-cp38-win_amd64.whl (2.1 MB) Collecting torchmetrics<0.8.0 Using cached torchmetrics-0.7.3-py3-none-any.whl (398 kB) Collecting torch-optimizer<0.2.0,>=0.0.1a12 Using cached torch_optimizer-0.1.0-py3-none-any.whl (72 kB) Collecting pandas>=0.23.4 Using cached pandas-2.0.0-cp38-cp38-win_amd64.whl (11.3 MB) Collecting torch>=1.8.0 Using cached torch-2.0.0-cp38-cp38-win_amd64.whl (172.3 MB) Collecting SoundFile>=0.10.2 Using cached soundfile-0.12.1-py2.py3-none-win_amd64.whl (1.0 MB) Collecting huggingface-hub>=0.0.2 Using cached huggingface_hub-0.13.4-py3-none-any.whl (200 kB) Collecting typing-extensions Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB) Collecting requests Using cached requests-2.28.2-py3-none-any.whl (62 kB) Collecting filelock Using cached filelock-3.12.0-py3-none-any.whl (10 kB) Collecting tqdm>=4.42.1 Using cached tqdm-4.65.0-py3-none-any.whl (77 kB) Collecting packaging>=20.9 Using cached packaging-23.1-py3-none-any.whl (48 kB) Collecting tzdata>=2022.1 Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB) Collecting python-dateutil>=2.8.2 Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Requirement already satisfied: pytz>=2020.1 in c:\users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages (from pandas>=0.23.4->asteroid) (2023.3) Collecting cached-property Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB) Collecting einops Using cached einops-0.6.1-py3-none-any.whl (42 kB) Collecting pesq Using cached pesq-0.0.4.tar.gz (38 kB) Preparing metadata (setup.py) ... done Collecting pystoi Using cached pystoi-0.3.3-py2.py3-none-any.whl Collecting mir-eval Using cached mir_eval-0.7-py3-none-any.whl Collecting lightning-utilities>=0.7.0 Using cached lightning_utilities-0.8.0-py3-none-any.whl (20 kB) Collecting fsspec[http]>2021.06.0 Using cached fsspec-2023.4.0-py3-none-any.whl (153 kB) Collecting cffi>=1.0 Using cached cffi-1.15.1-cp38-cp38-win_amd64.whl (178 kB) Collecting networkx Using cached networkx-3.1-py3-none-any.whl (2.1 MB) Collecting jinja2 Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Collecting sympy Using cached sympy-1.11.1-py3-none-any.whl (6.5 MB) Collecting pytorch-ranger>=0.1.1 Using cached pytorch_ranger-0.1.1-py3-none-any.whl (14 kB) Collecting pyDeprecate==0.3.* Using cached pyDeprecate-0.3.2-py3-none-any.whl (10 kB) Collecting pycparser Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB) Collecting aiohttp!=4.0.0a0,!=4.0.0a1 Using cached aiohttp-3.8.4-cp38-cp38-win_amd64.whl (324 kB) Collecting six>=1.5 Using cached six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting colorama Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB) Collecting MarkupSafe>=2.0 Using cached MarkupSafe-2.1.2-cp38-cp38-win_amd64.whl (16 kB) Collecting future Using cached future-0.18.3-py3-none-any.whl Collecting urllib3<1.27,>=1.21.1 Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB) Collecting idna<4,>=2.5 Using cached idna-3.4-py3-none-any.whl (61 kB) Collecting charset-normalizer<4,>=2 Using cached charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl (96 kB) Collecting certifi>=2017.4.17 Using cached certifi-2022.12.7-py3-none-any.whl (155 kB) Collecting mpmath>=0.19 Using cached mpmath-1.3.0-py3-none-any.whl (536 kB) Collecting frozenlist>=1.1.1 Using cached frozenlist-1.3.3-cp38-cp38-win_amd64.whl (34 kB) Collecting aiosignal>=1.1.2 Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB) Collecting attrs>=17.3.0 Using cached attrs-23.1.0-py3-none-any.whl (61 kB) Collecting async-timeout<5.0,>=4.0.0a3 Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB) Collecting multidict<7.0,>=4.5 Using cached multidict-6.0.4-cp38-cp38-win_amd64.whl (28 kB) Collecting yarl<2.0,>=1.0 Using cached yarl-1.8.2-cp38-cp38-win_amd64.whl (56 kB) Building wheels for collected packages: pesq Building wheel for pesq (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output] C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\pesq copying pesq_pesq.py -> build\lib.win-amd64-cpython-38\pesq copying pesq__init__.py -> build\lib.win-amd64-cpython-38\pesq copying pesq\cypesq.pyx -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesq.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqio.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmain.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqpar.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqdsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmod.c -> build\lib.win-amd64-cpython-38\pesq running build_ext cythoning pesq/cypesq.pyx to pesq\cypesq.c C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\franc\AppData\Local\Temp\pip-install-28ap14nl\pesq_8e931cee6b5246fab09b1916512682ae\pesq\cypesq.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'cypesq' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\pesq "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipesq -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" /Tcpesq/dsp.c /Fobuild\temp.win-amd64-cpython-38\Release\pesq/dsp.obj dsp.c pesq/dsp.c(105): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "math.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pesq Running setup.py clean for pesq Failed to build pesq Installing collected packages: pesq, mpmath, cached-property, urllib3, tzdata, typing-extensions, sympy, six, scipy, PyYAML, pyDeprecate, pycparser, packaging, networkx, multidict, MarkupSafe, idna, future, fsspec, frozenlist, filelock, einops, colorama, charset-normalizer, certifi, attrs, async-timeout, yarl, tqdm, requests, python-dateutil, pystoi, mir-eval, lightning-utilities, jinja2, cffi, aiosignal, torch, SoundFile, pb-bss-eval, pandas, huggingface-hub, aiohttp, torchmetrics, torchaudio, pytorch-ranger, julius, asteroid-filterbanks, torch-stoi, torch-optimizer, pytorch-lightning, asteroid Running setup.py install for pesq ... error error: subprocess-exited-with-error

× Running setup.py install for pesq did not run successfully. │ exit code: 1 ╰─> [31 lines of output] C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running install C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\pesq copying pesq_pesq.py -> build\lib.win-amd64-cpython-38\pesq copying pesq__init__.py -> build\lib.win-amd64-cpython-38\pesq copying pesq\cypesq.pyx -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesq.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqio.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmain.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqpar.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqdsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmod.c -> build\lib.win-amd64-cpython-38\pesq running build_ext skipping 'pesq\cypesq.c' Cython extension (up-to-date) building 'cypesq' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\pesq "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipesq -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" /Tcpesq/dsp.c /Fobuild\temp.win-amd64-cpython-38\Release\pesq/dsp.obj dsp.c pesq/dsp.c(105): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "math.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> pesq

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. `

To Reproduce

pip install asteroid

Package versions

Cython==0.29.34
numpy==1.24.2
pytz==2023.3

Additional info

This is the output of the suggested help #615:

` (my_env_asteroid) C:\Users\franc>pip install https://github.com/ludlows/python-pesq/archive/master.zip Collecting https://github.com/ludlows/python-pesq/archive/master.zip Downloading https://github.com/ludlows/python-pesq/archive/master.zip \ 223.1 kB 1.8 MB/s 0:00:00 Preparing metadata (setup.py) ... done Building wheels for collected packages: pesq Building wheel for pesq (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output] C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\pesq copying pesq_pesq.py -> build\lib.win-amd64-cpython-38\pesq copying pesq__init__.py -> build\lib.win-amd64-cpython-38\pesq copying pesq\cypesq.pyx -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesq.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqio.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmain.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqpar.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqdsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmod.c -> build\lib.win-amd64-cpython-38\pesq running build_ext cythoning pesq/cypesq.pyx to pesq\cypesq.c C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\franc\AppData\Local\Temp\pip-req-build-mh_397b0\pesq\cypesq.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'cypesq' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\pesq "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipesq -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" /Tcpesq/dsp.c /Fobuild\temp.win-amd64-cpython-38\Release\pesq/dsp.obj dsp.c pesq/dsp.c(105): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "math.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pesq Running setup.py clean for pesq Failed to build pesq Installing collected packages: pesq Running setup.py install for pesq ... error error: subprocess-exited-with-error

× Running setup.py install for pesq did not run successfully. │ exit code: 1 ╰─> [31 lines of output] C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( running install C:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\pesq copying pesq_pesq.py -> build\lib.win-amd64-cpython-38\pesq copying pesq__init__.py -> build\lib.win-amd64-cpython-38\pesq copying pesq\cypesq.pyx -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesq.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqio.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmain.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqpar.h -> build\lib.win-amd64-cpython-38\pesq copying pesq\dsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqdsp.c -> build\lib.win-amd64-cpython-38\pesq copying pesq\pesqmod.c -> build\lib.win-amd64-cpython-38\pesq running build_ext skipping 'pesq\cypesq.c' Cython extension (up-to-date) building 'cypesq' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\pesq "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipesq -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\lib\site-packages\numpy\core\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\include -IC:\Users\franc\anaconda3\envs\my_env_asteroid\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" /Tcpesq/dsp.c /Fobuild\temp.win-amd64-cpython-38\Release\pesq/dsp.obj dsp.c pesq/dsp.c(105): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "math.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> pesq

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. `

mpariente commented 1 year ago

Installing pesqcan often be problematic, and I haven't found reproducible workarounds.

However, if you just remove it from the dependencies, it will work without problem (just the metrics won't be computable).