Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
289 Views

How to install Movidius with Python 2 environment?

The default Movidius is install Caffe, TensorFlow with Python 3 environment.

 

If I want to install with Python 2, what can I do?
0 Kudos
7 Replies
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@miily Python 2.7 support is already integrated. Please see the NCSDK v 1.12 release notes.

0 Kudos
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@Tome_at_Intel Thank you.

 

I tried it and found that python 2 can import mvncapi, but can't import cv2, caffe, and tensorflow (maybe because they're installed on python 3)

 

If I want to use them on python 2, how can I do?
0 Kudos
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@miily Can you provide some information about your host system? Also try going to your Ncappzoo/tensorflow/inception_v1 directory and do a make. Then try the following command python2 run.py.

0 Kudos
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@Tome_at_Intel

 

I did make in ncsdk/example/tensorflow/inception_v1 directory and tried python2 run.py. I got below error.

 

 

Traceback (most recent call last):

 

File "run.py", line 22, in

 

import cv2

 

ImportError: No module named cv2

 

 

and when I use python3 run.py, it is successful execution like below:

 

 

Number of categories: 1001

 

Start download to NCS…

 

inception-v1 on NCS

 

547 electric guitar 0.97314

 

403 acoustic guitar 0.011787

 

883 vacuum, vacuum cleaner 0.0058098

 

421 banjo 0.0034828

 

492 chain saw, chainsaw 0.00058222

 

Finished

 

0 Kudos
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@miily Try pip install opencv-python and then trying python2 run.py again. Let me know if this works for you. Thanks.

0 Kudos
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@Tome_at_Intel It's works, thanks for your help.

0 Kudos
Highlighted
Community Manager
1 View

Re: How to install Movidius with Python 2 environment?

@miily You're welcomed!

0 Kudos