csukuangfj / sherpa-onnx

Apache License 2.0
5 stars 1 forks source link

ImportError: DLL load failed while importing _sherpa_onnx: #5

Open magicse opened 2 days ago

magicse commented 2 days ago

Windows. Version 1.10.27 File "C:\Python38\lib\site-packages\sherpa_onnx__init__.py", line 1, in from _sherpa_onnx import ( ImportError: DLL load failed while importing _sherpa_onnx: The specified module could not be found.

csukuangfj commented 2 days ago

how did you install sherpa-onnx?

magicse commented 2 days ago

pip install sherpa_onnx.

All binaries and dll in C:\Python38\bin

csukuangfj commented 2 days ago

Have you tried to.use.a virtual environment?

magicse commented 2 days ago

I will try.

magicse commented 2 days ago
Z:\sherpa>python -m venv myenv

Z:\sherpa>myenv\Scripts\activate

(myenv) Z:\sherpa>pip install sherpa-onnx
Collecting sherpa-onnx
  Downloading sherpa_onnx-1.10.27-cp38-cp38-win_amd64.whl (20.8 MB)
     |████████████████████████████████| 20.8 MB 504 kB/s
Installing collected packages: sherpa-onnx
Successfully installed sherpa-onnx-1.10.27
WARNING: You are using pip version 20.2.1; however, version 24.2 is available.
You should consider upgrading via the 'z:\sherpa\myenv\scripts\python.exe -m pip install --upgrade pip' command.

(myenv) Z:\sherpa>python -c "import sherpa_onnx; print(sherpa_onnx.__file__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "Z:\sherpa\myenv\lib\site-packages\sherpa_onnx\__init__.py", line 1, in <module>
    from _sherpa_onnx import (
ImportError: DLL load failed while importing _sherpa_onnx: The specified module could not be found.

(myenv) Z:\sherpa>
csukuangfj commented 2 days ago

how many onnxruntime.dll are there on your computer?

magicse commented 1 day ago

C:\Python38\bin\onnxruntime.dll C:\Python38\Lib\site-packages\onnxruntime.dll

C:\Python38\Lib\site-packages\onnxruntime\capi\onnxruntime.dll

csukuangfj commented 1 day ago

How did you find them?

Please delete all of them and reinstall sherpa-onnx.