简体   繁体   中英

Cannot find CV2 Module — Cannot find PythonLibs on openCV build?

I am trying to run a dumper script in Python 3.4.3. It is a tested script which works, but it fails for me saying that ImportError: No Module named 'cv2'

I think this might be due to the fact that openCV 3.0.0 didn't build the python bindings, but I am not sure. When I run cmake ./ in my build_binary directory it gives me these outputs (selected from a huge output):

-- Found PythonInterp: /usr/local/bin/python2.7 (found suitable version "2.7.9", minimum required is "2.7") 
-- Could NOT find PythonLibs (missing:  PYTHON_INCLUDE_DIRS) (found suitable exact version "2.7.9")
-- Found PythonInterp: /usr/bin/python3.4 (found suitable version "3.4.3", minimum required is "3.4") 
-- Found apache ant 1.9.3: /usr/bin/ant

and later on it gives:

--   Python 2:
--     Interpreter:                 /usr/local/bin/python2.7 (ver 2.7.9)
-- 
--   Python 3:
--     Interpreter:                 /usr/bin/python3.4 (ver 3.4.3)
-- 
--   Python (for build):            /usr/local/bin/python2.7
-- 

Any ideas why it cannot find my python libraries? Do we think that the problem even is that it didn't build the python portion?

Looks like this has been dealt with in SO before. If, by any chance, you have checked this link before and it was not helpful in solving your problem I found some other useful links:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM