Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajeev_A_Intel
Employee
1,573 Views

Calling python classification_sample.py after installation is giving the error "ImportError: DLL load failed:..." in Windows

Jump to solution

I installed OpenVINO in Windows 8.1 following the link https://software.intel.com/en-us/articles/OpenVINO-Install-Windows .The installation went successful and I am able to execute demo_squeezenet_download_convert_run.bat file. Then I tried running the command python classification_sample.py after executing the setenv.bat present in C:\Intel\computer_vision_sdk_2018.2.299\python. Now I am getting the following error.

Traceback (most recent call last):
  File "classification_sample.py", line 24, in <module>
    from openvino.inference_engine import IENetwork, IEPlugin
  File "C:\Intel\computer_vision_sdk_2018.2.299\python\python3.6\openvino\infere
nce_engine\__init__.py", line 1, in <module>
    from .ie_api import *
ImportError: DLL load failed: The specified module could not be found.

Thanks and Regards, Rajeev

0 Kudos
1 Solution
Alexey_S_Intel1
Employee
1,573 Views
Hi Rajeev,
Thank you for reporting this issue, we will fix it in the next release. 
Please download ie_api.pyd built with Python 3.6 here and replace it in the C:\Intel\computer_vision_sdk_2018.2.xxx\python\python3.6\openvino\inference_engine folder.
 
Thanks, 
Alexey

View solution in original post

18 Replies
Rajeev_A_Intel
Employee
1,573 Views

I loaded the dynamic link library that contains python module ie_api.pyd to see why it is not loading. The steps followed in Python 3.6 are 

import ctypes
ctypes.WinDLL("ie_api.pyd")

The error I am getting is as below. It looks like the ie_api.pyd DLL is created for Python 3.5 and is packaged with Python 3.6.

DLL Loading Error.png

I created a conda environment for Python 3.5 and executed the below script. It is working fine in Python 3.5 and not 3.6.

python classification_sample.py -i "C:\Intel\computer_vision_sdk_2018.2.299\deployment_tools\demo\car.png" -m "C:\Intel\computer_vision_sdk_2018.2.299\deployment_tools\demo\ir\squeezenet1.1.xml" -d CPU

 

Alexey_S_Intel1
Employee
1,574 Views
Hi Rajeev,
Thank you for reporting this issue, we will fix it in the next release. 
Please download ie_api.pyd built with Python 3.6 here and replace it in the C:\Intel\computer_vision_sdk_2018.2.xxx\python\python3.6\openvino\inference_engine folder.
 
Thanks, 
Alexey

View solution in original post

Rajeev_A_Intel
Employee
1,573 Views

Thank you Alexey. The newly provided ie_api.pyd is working fine with Python 3.6.

Platter__Paolo
Beginner
1,573 Views

Hi,    could you please provide the same ack for python 2.7 ?

Thanks

Paolo

 

 

 

Platter__Paolo
Beginner
1,573 Views

I'm getting this error at run time, starting the object_detection_demo_ssd_async.py:

File "ie_api.pyx", line 181, in inference_engine.ie_api.IEPlugin.load
RuntimeError: Unsupported primitive of type: DetectionOutput name: detection_out

Beverly_K_Intel
Employee
1,573 Views

I am having the same problem as the original post. I downloaded the new ie_api.pyd and still have the same error. I am running python3.6 on Windows 10. I had a previous python3.6 install and initially had problems with the PYTHONPATH: it would not find openvino.inference_engine at all. Then I found out that PYTHONPATH does not work well across distributions so I solved that problem by transferring the openvino directory from the Intel/computer_vision_sdk installation to my usual one that is in my system Path.

Now it will not load the dll. I get the exact same error as Rajeev.

I tried the new version provided by the previous poster but it still does not work.

Lu_L_Intel1
Employee
1,573 Views

I met the same issue on R5, solved by adding ....CVSDK_DIR\python\python3.6\openvino\infere
nce_engine in environment PATH.

zhang__chunyan
Beginner
1,573 Views

I met the same import error, I have add the python path ".\computer_vision_sdk_2018.4.420\python\python3.6"  and the inferece_engine path ".\computer_vision_sdk_2018.4.420\python\python3.6\openvino\inference_engine" to enviroent PATH, it still doesn't work.

  • Traceback (most recent call last):
      File "nms_demo_OpenVINO_ZCY.py", line 24, in <module>
        from openvino.inference_engine import *
      File "C:/Intel/computer_vision_sdk_2018.4.420/python/python3.5\openvino\inference_engine\__init__.py", line 1, in <module>
        from .ie_api import *
    ImportError: DLL load failed:
Koubele__Jakub
Beginner
1,573 Views

zhang, chunyan wrote:

I met the same import error, I have add the python path ".\computer_vision_sdk_2018.4.420\python\python3.6"  and the inferece_engine path ".\computer_vision_sdk_2018.4.420\python\python3.6\openvino\inference_engine" to enviroent PATH, it still doesn't work.

  • Traceback (most recent call last):
      File "nms_demo_OpenVINO_ZCY.py", line 24, in <module>
        from openvino.inference_engine import *
      File "C:/Intel/computer_vision_sdk_2018.4.420/python/python3.5\openvino\inference_engine\__init__.py", line 1, in <module>
        from .ie_api import *
    ImportError: DLL load failed:

I had the same problem and solved it by adding these folders to system path (not pythonpath):  

C:\Intel\computer_vision_sdk_2018.5.456\inference_engine\bin\intel64\Release and C:\Intel\computer_vision_sdk_2018.5.456\inference_engine\bin\intel64\Debug

Also, try running setupvars.bat in Intel\computer_vision_sdk_2018.5.456\bin from command line, then running python there - i was able to import the "from openvino.inference_engine import IENetwork, IEPlugin".

Shridhar__Kishan
Beginner
1,573 Views

I am also facing an error when trying to score with the inference engine.

 

    from openvino.inference_engine import IEPlugin
  File "C:\Program Files (x86)\IntelSWTools\openvino\python\python3.6\openvino\inference_engine\__init__.py", line 2, in <module>
    __version__ = get_version()
NameError: name 'get_version' is not defined

Lowe__Benjamin
Beginner
1,573 Views

I am using Windows 10 64 bit pro, after installing w_openvino_toolkit_p_2018.5.456.exe and following the installation instructions I found that running setup.bat in the windows powershell had no effect on the PYTHONPATH variable, and I could not import openvino in python.

Based on suggestions above, I manually add the following paths to PYTHONPATH:

C:\Intel\computer_vision_sdk\python\python3.6\openvino\inference_engine 

C:\Intel\computer_vision_sdk\python\python3.6

Then when I ran `from openvino.inference_engine import IENetwork, IEPlugin` I would get the error described in this thread (ImportError: DLL load failed: The specified module could not be found) 

And so I added to PATH the following, as suggested by Koubele, Jak:

C:\Intel\computer_vision_sdk_2018.5.456\inference_engine\bin\intel64\Release  C:\Intel\computer_vision_sdk_2018.5.456\inference_engine\bin\intel64\Debug

After this I could run `from openvino.inference_engine import IENetwork, IEPlugin`  succesfully.

Shubha_R_Intel
Employee
1,573 Views

Dear Lowe, Benjamin,

Thanks for your reporting your success strategies back on this forum. However I noticed that you are using a very old version of OpenVino. Please upgrade to the latest 2019R1.1 when you get a moment.

Thanks !

Shubha

Febriyan__Arvin
Beginner
1,573 Views

Hi there, 

I had the same issue, but now with 2019R1. 

Regards,

Arvin

Febriyan__Arvin
Beginner
1,573 Views

Hi, 

I tried permanently setting up the openvino variables on PATH and now it works.

https://www.intel.com/content/www/us/en/support/articles/000033440/boards-and-kits/neural-compute-st...

Hope that can help. 


Regards,
Arvin

Soni__Neha
Beginner
1,573 Views

Hi
 

 

I am getting these error while running my model for inference.

 

 

Traceback (most recent call last):
  File "left_eye_detect.py", line 28, in <module>
    from openvino.inference_engine import IENetwork, IEPlugin
  File "/opt/intel/openvino_2019.1.144/python/python3.7/openvino/inference_engine/__init__.py", line 1, in <module>
    from .ie_api import *
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

 

 

 

please help
 

Shubha_R_Intel
Employee
1,573 Views

Dear Soni, Neha,

It looks like you are still using OpenVIno 2019R1.1. Can you kindly install OpenVino 2019R2 and try again ? As others have mentioned this is a PYTHONPATH not getting set issue. But if you run setupvars.sh after thorough and proper installation you should not have this problem anymore.

Thanks,

Shubha

Han__Tianyi
Beginner
1,573 Views

Dear Febriyan, Arvin,

It's helpful to me.

Thanks!

Han

ota__keiichi
Beginner
1,573 Views

I want to use human-pose-estimation-3d.
There is an ie "api.pyd" file in the interface_engine folder of python3.6 folder.
Any method shown in this thread,all done.
Please teach me the tip to solve the error.
___
OpenVINO 2020.1
OS:Windows10 Pro v1909 OS build 18363.418
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
___

>python human_pose_estimation_3d_demo.py -i "cam" -m "human-pose-estimation-3d-0001.xml" -d "CPU"

Traceback (most recent call last):
  File "human_pose_estimation_3d_demo.py", line 22, in <module>
    from modules.inference_engine import InferenceEngine
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\demos\python_demos\human_pose_estimation_3d_demo\modules\inference_engine.py", line 19, in <module>
    from openvino.inference_engine import IENetwork, IECore
  File "C:\Program Files (x86)\IntelSWTools\openvino\python\python3.6\openvino\inference_engine\__init__.py", line 1, in <module>
    from .ie_api import *
ImportError: DLL load failed: The specified module could not be found

Reply