Ask Your Question

latest opencv bindings for python3 goes to an unknown python directory on Ubuntu

asked 2018-12-06 09:08:15 -0500

swiss_knight gravatar image

updated 2018-12-06 09:08:57 -0500

Issue description:

When using cmake-gui on Ubuntu to build the latest 'master' opencv from git, the Python binding goes to a funky directory: /usr/local/python/cv2/
instead of: /usr/local/lib/python3.6/dist-packages/.

I haven't found where in cmake-gui we can change this? The only path available is: PYTHON3_PACKAGES_PATH which in my case was set to lib/python3.6/dist-packages relative to /usr/local of course.

So, it should have end up in the correct directory, I don't know why it doesn't.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-12-06 09:27:53 -0500

berak gravatar image

a known issue. quoting from here:

There are these options:

Don't install this loader package (it is mostly for standalone distributions): #12977 (comment)

Old behavior can restored via these CMake variables:

OPENCV_SKIP_PYTHON_LOADER=ON location... (not required since #13254) is not complete for now and its usage is very limited (it is a bit tricky to install native binaries with their dependencies in Python). Try to install this loader in develop mode instead:

python3 develop
pip install -e .
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-12-06 09:08:15 -0500

Seen: 827 times

Last updated: Dec 06 '18