- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an import error where I can't import from openvino. I ran the installation correctly and ran the two files (demo_squeezenet_download_convert_run.bat and demo_security_barrier_camera.bat) that are required to check if the installation worked fine. But when trying to run classification_sample.py The import error comes up.
I am running on Windows, python 3.6.5, and do not have a intel GPU.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear hochi, andre,
Did you run C:\Program Files (x86)\IntelSWTools\openvino_2019.1.148\bin\setupvars.bat first ? Also are you using the latest and greatest OpenVino release - 2019 R1.1 ?
If you don't have an Intel integrated GPU, that's OK. classification_sample.py by default will run on a CPU.
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I have, I believe that file is supposed to set up the paths. When I run it a screen appears for .1 seconds then disappears.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But I still have the import error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also Yes I am running OpenVino 2019 R1.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear hochi, andre,
So you are running Windows 10 right ? From a command shell (DOS) after you run setupvars.bat, please type echo %PYTHONPATH% . Please post the result here.
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have run: "C:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat".
And I got:
Python 3.6.4
ECHO is off.
PYTHONPATH=C:\Program Files (x86)\IntelSWTools\openvino\python\pythonprogram.or;C:\Program Files (x86)\IntelSWTools\openvino\python\pythonprogram.or
[setupvars.bat] OpenVINO environment initialized
But I still get: ModuleNotFoundError: No module named 'openvino', because of from openvino.inference_engine import IENetwork, IEPlugin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"C:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat" have to be run from command prompt window each time as you open cmd.
then, after that, you can run 'python3 classification_sample.py' in this cmd window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, have you solved the problem? Maybe the execution of setupvars.bat hadn't taken effect yet. Have you checked whether the environment variables had been all set? Try to run it again and log off then log in again then check your environment variables. if the same problem still occurs maybe you should check out this link and set the variables manually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
OpenVino 2019R2 just got released yesterday. Please download it and give it a try !
Thanks,
Shubha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've followed all the installation instructions for Ubuntu and it has this problem. setupvars are already set and working. What should I do now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have this problem with ubuntu. setupvars.sh was executed so the problem comes from somewhere else. [setupvars.sh] OpenVINO environment initialized pabloz@pabloz-HP-Laptop:~/desarrollo/safety-gear-detector-python/application$ python3 -c "import cv2; print(cv2.__version__)" 4.2.0-openvino pabloz@pabloz-HP-Laptop:~/desarrollo/safety-gear-detector-python/application$ python3 -c "import openvino; print(openvino.__version__)" Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'openvino' has no attribute '__version__' pabloz@pabloz-HP-Laptop:~/desarrollo/safety-gear-detector-python/application$ sudo python3 ./safety_gear_detector.py -d CPU -m /opt/intel/openvino/deployment_tools/open_model_zoo/tools/downloader/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml -sm ../resources/worker-safety-mobilenet/FP32/worker_safety_mobilenet.xml -e /opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libcpu_extension_avx2.so Traceback (most recent call last): File "./safety_gear_detector.py", line 33, in <module> from inference import Network File "/home/pabloz/desarrollo/safety-gear-detector-python/application/inference.py", line 28, in <module> from openvino.inference_engine import IENetwork, IECore ModuleNotFoundError: No module named 'openvino'
Also, the "rich text" formatting options of this website to share these lines are terrible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you solved this error yet? How did you do it? I also have the same problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not working. What am I missing?
[setupvars.sh] OpenVINO environment initialized
pabloz@pabloz-HP-Laptop:~/desarrollo/safety-gear-detector-python/application$ python3 -c "import cv2; print(cv2.__version__)"
4.2.0-openvino
pabloz@pabloz-HP-Laptop:~/desarrollo/safety-gear-detector-python/application$ python3 -c "import openvino; print(openvino.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'openvino' has no attribute '__version__'
pabloz@pabloz-HP-Laptop:~/desarrollo/safety-gear-detector-python/application$ sudo python3 ./safety_gear_detector.py -d CPU -m /opt/intel/openvino/deployment_tools/open_model_zoo/tools/downloader/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml -sm ../resources/worker-safety-mobilenet/FP32/worker_safety_mobilenet.xml -e /opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libcpu_extension_avx2.so
Traceback (most recent call last):
File "./safety_gear_detector.py", line 33, in <module>
from inference import Network
File "/home/pabloz/desarrollo/safety-gear-detector-python/application/inference.py", line 28, in <module>
from openvino.inference_engine import IENetwork, IECore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I have run: "C:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat".
And i got:
Python 3.7.6
ECHO is off.
PYTHONPATH=C:\Program Files (x86)\IntelSWTools\openvino_2019.3.379\deployment_tools\open_model_zoo\tools\accuracy_checker;C:\Program Files (x86)\IntelSWTools\openvino_2019.3.379\python\python3.7;C:\Program Files (x86)\IntelSWTools\openvino_2019.3.379\python\python3;
[setupvars.bat] OpenVINO environment initialized
But I still get: ModuleNotFoundError: No module named 'openvino'.
I have tried on many versions but none of them solved the problem. Please help me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you are using visual studio code, open your project , go to cmd terminal and run the setupvars.bat file you run in the cma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Having the same problem. ubuntu 18.04
/opt/intel/openvino/bin/setupvars.sh
[setupvars.sh] OpenVINO environment initialized
echo $PYTHONPATH
nothing is printed. env shows no variables set specific to openvino. The setupvars.sh script is not having any effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fixed it. Instead of running /opt/intel/openvino/setupvars.sh, you have to source it.
source /opt/intel/openvino/setupvars.sh
echo $PYTHONPATH
/opt/intel/openvino_2020.2.120/python/python3.6:/opt/intel/openvino_2020.2.120/python/python3:/opt/intel/openvino_2020.2.120/deployment_tools/open_model_zoo/tools/accuracy_checker:/opt/intel/openvino_2020.2.120/deployment_tools/model_optimizer:/opt/intel/openvino_2020.2.120/data_processing/dl_streamer/python:/opt/intel/openvino_2020.2.120/data_processing/gstreamer/lib/python3.6/site-packages:/opt/intel/openvino_2020.2.120/python/python3.6:/opt/intel/openvino_2020.2.120/python/python3:/opt/intel/openvino_2020.2.120/deployment_tools/open_model_zoo/tools/accuracy_checker:/opt/intel/openvino_2020.2.120/deployment_tools/model_optimizer:/opt/intel/openvino_2020.2.120/data_processing/dl_streamer/python:/opt/intel/openvino_2020.2.120/data_processing/gstreamer/lib/python3.6/site-packages:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I am facing the same problem as "No Module named Openvino", But I dont know how to fix it. Can you please tell me how you fixed that. I dint get your solution,
Instead of running /opt/intel/openvino/setupvars.sh, you have to source it.
source /opt/intel/openvino/setupvars.sh
How to do this? where to right this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even it is an old topic, I solved this problem for a raspberry pi by taking care of the linux xxbits version according to the openvino xxbits version.
I my case, i setup an 64bits 2023-05-03-raspios-bullseye-arm64.img.xzand then a 64bits openvino and it works perfectly. Dont forget to use "source" to run the setupvars.sh
Have fun.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page