Search code examples
python-3.xobject-detectionyoloopenvino

No module named mvnc


I was supposed to follow this tutorial for my YOLO object detection project. However, when I tried to invoke 'make run' under the hello_ncs_py directory, I received the following error message. I am fairly new to Neural Computer Strick 2, so I am quite lost about what I am doing wrong.

(openvino) root@raspberrypi:~/workspace/ncapp00/apps/hello_ncs_py# make run

making run
python3 hello_ncs.py;
Traceback (most recent call last):
  File "hello_ncs.py", line 19, in <module>
    import mvnc.mvncapi as fx
ModuleNotFoundError: No module named 'mvnc'
make: *** [Makefile:11: run] Error 1

However, I have successfully followed the instructions from another tutorial, a deployment toolkit on my machine. But the former link is using NCS-API mode only, which I unsuccessfully installed.

If there is anyone who is experienced or has come across a similar problem, how do I properly fix to this problem? Perhaps giving me an idea of what I am doing wrong would be highly appreciated.

My goal is to achieve the following message. Without having this message, I will not be able to run YOLO algorithms to detect objects using NCS 2.

making run
python3 hello_ncs.py;
Hello NCS! Device opened normally.
Goodbye NCS! Device closed normally.
NCS device working.

Thank you for your kind attention and cooperation. Any suggestion or clarification is greatly appreciated.


Solution

  • Unfortunately you will not be able to use Python virtual environments with the NCS. You can’t isolate the development environments with virtual environments and the installer actually removes previous installations of OpenCV from your system. For this reason you should not get the installer scripts anywhere near your current projects and working environments.

    Indeed, Python virtual environments are a best practice in the Python community but the biggest gripes with the Neural Compute Stick is that Intel’s install scripts will actually make your virtual environments nearly unusable. The installer downloads packages from the Debian/Ubuntu Aptitude repos and changes your PYTHONPATH system variable

    You may find more infos here