"Python" python2.7 installation configuration OpenCV2

Source: Internet
Author: User

Environment: Ubuntu16.04 Anaconda Python2.7 opencv2.4.13

Import CV2 encountered an error message after installing OPENCV:

No module named Cv2

When you install OPENCV, the file "Cv2.so" appears during make, which is the key file that connects OpenCV and Python. The reason for the error is that Python can't find the cv2.so file we just mentioned.

/usr/local/lib/python2.7 found two folders, one is Dist-package, one is Site-package,python by default only in the former search, and we generated the cv2.so file in our installation

(Search for the file in the installation directory) simply move it to the Dist-package folder

If Anaconda is installed, copy the file to "Anaconda/lib/python2.7/site-packages"

"Python" python2.7 installation configuration OpenCV2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.