pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.79k stars 21.33k forks source link

Python3.6 - ImportError: No module named 'cv2 - Ubuntu 14.04 LTS #1825

Closed iamgiuly closed 5 years ago

iamgiuly commented 5 years ago

Hi, first sorry for my bad english.

I have Ubuntu 14.04 LTS with Python2.7 installed. I tried to train a network with German Traffic Sign Detection Benchmark dataset In order to do this, i need to change the format data that GTSDB cointains. I found a python script "general_parser.py" that do this in SaferAuto Github in "Datasets2Darknet @ bea2e4b".

For run the script i need to install Python3.6 in order to use choices attribute of random module (introduced in Python 3.6). I tried to install it and use with virtualenv (following this guide http://devopspy.com/python/install-python-3-6-ubuntu-lts/ but when i run the script the console output this error message:
ImportError: No module named cv2

I also tried to install opencv in the virtualenv with command: pip install opencv-python but the system says that it already exits! Can someone help me?

Thanks

rgov commented 5 years ago

This issue is not related to Darknet and so a better place to ask might be on Stack Overflow where you can get more general Python / Ubuntu / virtualenv help.

Maybe you did not activate the virtualenv before you tried to run pip?

iamgiuly commented 5 years ago

Sorry. Virtualenv was active... Maybe I have done some confusion with packages dependencies. I'll probably delete all and reinstall. Thanks.