Ask Your Question
0

Cannot find python libraries for CMake in Opencv3.0.0

asked 2014-10-26 21:08:37 -0500

navderm gravatar image

Trying to build Opencv3.0.0 (dev), cmake finds the binary and python 2 locations but isn't able to include python libraries.

I use cmake-gui for makefile generation. While configuring cmake, it gives this piece of info along with other various :


-- Python 2:

-- Interpreter: /usr/bin/python2.7 (ver 2.7.6)

-- Libraries: NO

-- numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)

-- packages path: lib/python2.7/dist-packages


-- Python 3:

-- Interpreter: /usr/bin/python3.4 (ver 3.4)

I have cross checked and the input for python2 I provide are all correct (included as attachment): enter image description here (Please take a look at the image before reading further)

So, now I am wondering whether this is architecture problem or version problem (compatibility with different versions of opencv, python, cmake)

Versions I am currently using are : opencv : 3.0.0-dev

python2 : 2.7.6

python3 : 3.4.0

cmake : 2.8.12.2

System : ubuntu 14.04 (amd architecture, 64 bit)

Linux Kernel version : Linux version 3.13.0-27-generic (buildd@akateko) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014

I am, at this point stuck as to what to do . Can someone nudge me in right direction please.

P.S. Guys working on opencv. I absolutely hate what you've done with 3.0.0 !!

edit retag flag offensive close merge delete

Comments

I currently have the exact same issue with 3.0-gold. Did you ever find a resolution?

ElanHR gravatar imageElanHR ( 2015-06-20 22:25:47 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2015-06-22 15:49:23 -0500

ElanHR gravatar image

I was able to solve this by updating my CMAKE 3.2 which changed the "Libraries: NO" issue and thus let me build the python bindings.

edit flag offensive delete link more

Comments

I am trying the same thing right now. Had same issue with CMAKE-GUI 2.8, lets see if I get this fixed!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-07 08:51:48 -0500 )edit
0

answered 2016-01-01 09:24:45 -0500

updated 2016-01-03 19:22:25 -0500

I have a similar issue with opencv 3.1.0 and ubuntu 14.04. I don't know which one (ubuntu version or other libraries version) causes this one. I have worked using ubuntu 12.04 + 3.0.0 for a long time. Today I upgraded ubuntu version on another PC. Finally I resolved my issue by typeing the following options manually when running cmake, not cmake-gui

cmake -D PYTHON_INCLUDE_DIR=/usr/include/python2.7 -D PYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python2.7 -D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so

I know that this is not the perfect solution. If some other factor changes, it may not work well. I suspect that there is some conflicts between specific versions of cmake and opencv build-script.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-10-26 21:08:37 -0500

Seen: 4,993 times

Last updated: Jan 03 '16