Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5774 Discussions

openvino 2021 FileNotFoundError:[WinError 2]

EddieChen
Novice
735 Views

When I am using the openvino 2021 with python 3.8 version.

I got an error message.

FileNotFoundError[WinError 2]:

"C:\Programs Files (x86)\IntelSWTools\openvino_2021\python\python3.8\openvino\libs"

 

And I check the "C:\Programs Files (x86)\IntelSWTools\openvino_2021\python\python3.8\openvino\"

The "libs" folder was not existing.


Please help me to resolve this error.

Thank you.

0 Kudos
10 Replies
Peh_Intel
Moderator
720 Views

Hi Eddie,


Thanks for reaching out to us.


I also do not have this “libs” folder on my side. I would like to know how you get this error message.



Regards,

Peh


EddieChen
Novice
709 Views

Dear Peh,

When I try to import the module, this error message will show on cmd window.

2.PNG

openvino version: 2021_R3
python version: 3.8.4

Best regards,

Eddie

 

 

Peh_Intel
Moderator
688 Views

Hi Eddie,


Did you run the setupvars.bat batch file before import the module? It is in the bin directory:

<install_dir>\bin


You must update several environment variables before you can compile and run OpenVINO™ applications. Run the setupvars.bat batch file for every new opened Command Prompt.



Regards,

Peh


EddieChen
Novice
683 Views

Dear Peh,

Did you run the setupvars.bat batch file before import the module? It is in the bin directory:

<install_dir>\bin

 

>>Yes, I run the setupvars.bat before I run my own code.

 

Also, I ever run my own code on python 3.7.9, that has never happened this error.

 

Best regards,

 

Eddie

 

Peh_Intel
Moderator
642 Views

Hi Eddie,


Thanks for pointing out this issue. I also validated that OpenVINO™ is unable to work with Python 3.8 and above on my side. There is a bug in the installation script. It only happens on python 3.8 and above.


Please downgrade your Python version to Python 3.7 for now as developer is fixing the bug.



Regards,

Peh


EddieChen
Novice
623 Views

Dear Peh,

 

Thanks for your reply.

I am using the python 3.7 right now.

But, the python 3.7 does not support shared memory in the multiprocessing module.

 

Best regards,

Eddie

Peh_Intel
Moderator
619 Views

Hi Eddie,


Glad to inform you that we are able to solve this issue.


There are four scripts required to modify. Please refer to this link to remove the codes under the red-highlighted regions and added the codes under the green-highlighted regions. Please be aware of sequence and space when pasting the codes.


The four scripts are in the following directories:


1. <INSTALL_DIR>\openvino_2021.3.394\python\python3.8\openvino\inference_engine\__init__.py

 

2. <INSTALL_DIR>\openvino_2021.3.394\python\python3.8\openvino\offline_transformations\__init__.py

 

3. <INSTALL_DIR>\openvino_2021.3.394\python\python3.8\ngraph\impl\__init__.py

 

4. <INSTALL_DIR>\openvino_2021.3.394\bin\setupvars.bat



I’ve validated with Python version 3.8.0, 3.8.4 and 3.8.9 after modifying these four scripts.



Regards,

Peh


EddieChen
Novice
597 Views

Dear Peh,

 

This problem was solved.


There is still another problem that the CV2 module can’t be imported.

 

Like this:

import cv2_1.PNG

 

 Best regards,

Eddie

Peh_Intel
Moderator
571 Views

Hi Eddie,


The issue we encountered for Python 3.8 in OpenVINO™ 2021.3 has been fixed and will be available for the next distribution release which is OpenVINO™  2021.4.


As for now, there are three options for you:


Option 1: Downgrade the Python version to Python 3.7.


Option 2: Wait for the release of OpenVINO™ 2021.4.


Option 3: Download the OpenVINO™ GitHub version and compile it for windows by following this WIKI.



Regards,

Peh


Peh_Intel
Moderator
484 Views

Hi Eddie,


This thread will no longer be monitored since we have provided suggestion. If you need any additional information from Intel, please submit a new question.



Regards,

Peh


Reply