1

I have OpenCV3 installed on my machine, and from Python2.7 I can import it with no problem,

Import cv2

But doing samething using Python3 would lead to missing module error,

I read some solutions that need to install OpenCV again, like this

But I don't want to install OpenCV again from Scratch, so how can I just link Python3 with the installed OpenCV,

Thanks,

P.S

I installed openCV by following this page: http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87
Mohanad Kaleia
  • 793
  • 1
  • 9
  • 22
  • I installed latest version of opecv-python with just one command :`pip3 install opencv-python` on my windows machine. Maybe you should try it in your linux. – Feishi Apr 15 '17 at 04:51
  • 1
    You have to rebuild it for python3 as the library needs to link with numpy3 also. – Quang Hoang Apr 15 '17 at 06:22
  • How can I build it for Python3? Thank you – Mohanad Kaleia Apr 15 '17 at 20:02
  • @QuangHoang thanks you are right, I had to remove the build directory of opencv (release) and build again using cmake, make and install make, Then I was able to use opencv from python3 I don't know if we need to write that as an answer, Appreciate it – Mohanad Kaleia Apr 15 '17 at 22:19

0 Answers0