wenet-e2e / wenet

Production First and Production Ready End-to-End Speech Recognition Toolkit
https://wenet-e2e.github.io/wenet/
Apache License 2.0
3.88k stars 1.04k forks source link

python setup.py egg_info did not run successfully. #2561

Closed 1074854980 closed 2 days ago

1074854980 commented 4 days ago

Hi

I run the following script pip install -r requirements.txt

but I get error `Collecting deepspeed>=0.14.0 (from -r requirements.txt (line 21)) Using cached deepspeed-0.14.4.tar.gz (1.3 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [16 lines of output] D:\miniconda3\envs\wenet\Lib\site-packages\torch\nn\modules\transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.) device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'), Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\Jason\AppData\Local\Temp\pip-install-2lhkoh0b\deepspeed_4d132ab59b764e1db3964df21ed112da\setup.py", line 181, in abort(f"Unable to pre-compile {op_name}") File "C:\Users\Jason\AppData\Local\Temp\pip-install-2lhkoh0b\deepspeed_4d132ab59b764e1db3964df21ed112da\setup.py", line 53, in abort assert False, msg ^^^^^ AssertionError: Unable to pre-compile async_io DS_BUILD_OPS=1  [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.  [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.  [WARNING]  One can disable async_io with DS_BUILD_AIO=0  [ERROR]  Unable to pre-compile async_io [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

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

Among them, I found an error message prompt UserWarning: Failed to initialize NumPy: No module named 'numpy' What version of NumPy should I install? When I tried to install numpy version 2.0.0,When I re-execute the following command pip install -r requirements.txt Got an error message containing the following message: Among them, I found an error message prompt NumPy 1. x cannot be run in NumPy 2.0.0 as it may crash.

my environment windows10 22H2

`python -m pip list Package Version


filelock 3.13.1 fsspec 2024.2.0 Jinja2 3.1.3 MarkupSafe 2.1.5 mpmath 1.3.0 networkx 3.2.1 numpy 2.0.0 pip 24.0 setuptools 70.1.1 sympy 1.12 torch 2.2.2+cu121 torchaudio 2.2.2+cu121 typing_extensions 4.9.0 wheel 0.43.0`

1074854980 commented 2 days ago

This issue has been resolved, there was an issue when installing deepspeed in windows environment. After cloning the deepspeed code and compiling it manually, deepspeed was successfully installed. After the installation is successful, run the pip install -r requirements.txt command again