-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'get_all_providers' from 'onnxruntime.capi._pybind_state' #4196
Comments
Which platform are you on ? Do you have the GPU package installed ? Have you installed CUDA/CuDNN (please see system requirements) ? P.S. Filling out the GitHub issue template completely would help (it is missing important details like system info) |
@hariharans29 thank you for the reply I have edited the comment, putting the system information. What do you mean by source/binary? I used the pip command to install it And about Cuda, I don't have a GPU, so should I install it the same? |
@alex96295, please run the following commands for CPU only version: Install latest VC 2019 Runtime here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads |
@tianleiwu ok I did it, now onnx is imported correctly also on Windows. On Linux, it worked immediately since there are GPUs in the server of the University that I use, I think that I shouldn't have installed onnxruntime-gpu not having one on Windows, right? |
Glad it worked. You probably had onnxruntime_gpu installed first (it would expect CUDA dlls which were probably missing) or probably you had onnxruntime installed but the VCRuntime was missing. Please just use onnxruntime (and not onnxruntime_gpu) on any hardware that doesn't support using CUDA. |
macos users can try |
use microsoft process monitor |
Here is a link to a tutorial I wrote for how I fixed this on Windows 10 with Python 3.7. The onnx runtime website shows how to install with The tutorial is in written form with screencaps and also links to a video to show proof of fix as well. |
Describe the bug
A clear and concise description of what the bug is.
I can't import onnxruntime; I had a look at the opened issues up to now, some were similar but I preferred to open a new one.
Urgency
If there are particular important use cases blocked by this or strict project-related timelines, please share more information and dates. If there are no hard deadlines, please specify none.
Quite urgent
System information
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Error logs:
Additional context
Add any other context about the problem here. If the issue is about a particular model, please share the model details as well to facilitate debugging.
The text was updated successfully, but these errors were encountered: