Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Error during running the Image Classification demo script after installing

Hai_H_Intel
Employee
620 Views

 

I met the below error during running the Image Classification demo script after installing with below:

sudo ./demo_squeezenet_download_convert_run.sh

Anyone met same issue and does anyone know how to fix the problem? Thanks a lot!

Huang Hai

-----------------------------

Convert a model with Model Optimizer
 
Run python3.6 /opt/intel/computer_vision_sdk_fpga_2018.2.300/deployment_tools/model_optimizer/mo.py --input_model /opt/intel/computer_vision_sdk_fpga_2018.2.300/deployment_tools/demo/../demo/classification/squeezenet/1.1/caffe/squeezenet1.1.caffemodel --output_dir ir/squeezenet1.1 --data_type FP32
 
Traceback (most recent call last):
  File "/opt/intel/computer_vision_sdk_fpga_2018.2.300/deployment_tools/model_optimizer/mo.py", line 28, in <module>
    from mo.main import main
  File "/opt/intel/computer_vision_sdk_fpga_2018.2.300/deployment_tools/model_optimizer/mo/main.py", line 24, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
Error on or near line 163; exiting with status 1
 
-----------------------------
0 Kudos
6 Replies
Severine_H_Intel
Employee
620 Views

Hi Huang, 

the prerequisites installation such as numpy library should have happened before this error, can you show the debug output in between "Configure Model Optimizer" and this error?

Doing pip3 install numpy should solve your issue, but we need to investigate why the pre-requisites call did not work properly in your case. 

Best, 

Severine

 

0 Kudos
Hai_H_Intel
Employee
620 Views

Hi Severine, Thanks for looking into my issue. The information you requested as below: 


###################################################
Configure Model Optimizer
 
INTEL_CVSDK_DIR environment variable is not set. Trying to run ./setvars.sh to set it.
[setupvars.sh] OpenVINO environment initialized
Found existing environment. Skipping installing dependencies for Model Optimizer.
If you want to install again, remove venv directory. Then run the script again
 
###################################################
 

And I can't find the file 'setvars.sh', also in our install instruction, don't mention need to run it. Thanks!

Huang Hai

0 Kudos
Hai_H_Intel
Employee
620 Views

I am try to install the numpy as you mentioned, but it is already install, so this issue may caused by another reason. Thanks!

---------------------

[root@localhost ~]# yum install numpy
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: ftp.jaist.ac.jp
 * extras: mirrors.163.com
 * ius: mirrors.kernel.org
 * nux-dextop: mirror.li.nux.ro
 * updates: mirrors.nju.edu.cn
Package 1:numpy-1.7.1-13.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost ~]#
--------------------

Huang Hai

0 Kudos
Severine_H_Intel
Employee
620 Views

Hi Huang, 

you can find the documentation on how to setup the environment variables here: https://software.intel.com/en-us/articles/OpenVINO-Install-Linux (search Set the Environment Variables). However, this is not the issue here.

I see you use CentOS, I was trying to reproduce your error with Ubuntu. I need to investigate what is causing the issue, it is maybe the virtual environment activation. This could explain the mismatch of  numpy installation.

Best,

Severine

0 Kudos
Severine_H_Intel
Employee
620 Views

 Hi Huang, 

it seems to be the virtual environment activation. If you comment the line 154, source $prereqs_mo_path/../venv/bin/activate , is it working?

Best, 

Severine

0 Kudos
Hai_H_Intel
Employee
620 Views

Thanks Severine!

As your suggestion, after I removed the venv folder and upgrade the cmake from 2.8 to 3.12, the issue fixed. Thanks!

Huang Hai

0 Kudos
Reply