Skip to content
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

Error: DLL load failed #251

Closed
Exlsunshine opened this issue Dec 25, 2018 · 4 comments
Closed

Error: DLL load failed #251

Exlsunshine opened this issue Dec 25, 2018 · 4 comments

Comments

@Exlsunshine
Copy link
Contributor

Describe the bug
Program not work.

C:\Users\guyan\AppData\Local\Programs\Python\Python36\lib\site-packages\onnxruntime\capi\_pybind_state.py:12: UserWarning: Cannot load onnxruntime.capi. Error: 'DLL load failed: The specified module could not be found.'
  warnings.warn("Cannot load onnxruntime.capi. Error: '{0}'".format(str(e)))
Traceback (most recent call last):
  File ".\inference.py", line 1, in <module>
    import onnxruntime
  File "C:\Users\guyan\AppData\Local\Programs\Python\Python36\lib\site-packages\onnxruntime\__init__.py", line 21, in <module>
    from onnxruntime.capi._pybind_state import RunOptions, SessionOptions, get_device, NodeArg, ModelMetadata
ImportError: cannot import name 'RunOptions'

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
    Windows 10 Enterprise

  • ONNX Runtime installed from (source or binary):
    pip install onnxruntime

  • ONNX Runtime version:
    0.1.4

  • Python version:
    3.6.6

  • GCC/Compiler version (if compiling from source):

  • CUDA/cuDNN version:

  • GPU model and memory:

To Reproduce
run the following code:

import onnxruntime

session = onnxruntime.InferenceSession("alexnet.onnx")

Expected behavior
No error messages.

@YueshangGu
Copy link

I got the same question.

@snnn
Copy link
Member

snnn commented Dec 26, 2018

You may drag the DLL into Dependency Walker, to get known which DLL was missed.

@pranavsharma
Copy link
Contributor

Your CUDA DLLs are not in the path. Hence they can't be found. Just add them to your environment path.

@pranavsharma
Copy link
Contributor

Please re-open if the suggested solution doesn't work for you. Thanks for your time in trying out onnxruntime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants