Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install opencv-contrib-python from Alpine Linux #75

Closed
zoonoo opened this issue Mar 3, 2018 · 3 comments
Closed

Cannot install opencv-contrib-python from Alpine Linux #75

zoonoo opened this issue Mar 3, 2018 · 3 comments

Comments

@zoonoo
Copy link

zoonoo commented Mar 3, 2018

Actual behaviour

Could not find a version that satisfies the requirement opencv-contrib-python (from -r /repo/requirements.txt (line 2)) (from versions: )
Cleaning up...
Removing source in /tmp/pip-build-7x79cyfg/numpy
No matching distribution found for opencv-contrib-python (from -r /repo/requirements.txt (line 2))

Steps to reproduce

I tried to download opencv-contrib-python package from Alpine Linux Docker Image but failed.

  • example code : pip install opencv-contrib-python
  • operating system : https://hub.docker.com/_/alpine/
  • architecture (e.g. x86) : x86
  • opencv-python version : didn't work for any. specifically tried for 3.4.0.12
@skvark
Copy link
Member

skvark commented Mar 4, 2018

Your pip is most likely too old. Try pip install --upgrade pip and run pip install opencv-contrib-python again.

@skvark skvark closed this as completed Mar 4, 2018
@smallcandles
Copy link

Note that opencv-python also fails to install with pip on Alpine. Updating pip does not solve the problem. I believe that the problem is that Alpine does not appear to be supported by manylinux. Would you be open to building opencv-python specifically for alpine as alpine is often used for Docker containers?

@skvark
Copy link
Member

skvark commented May 12, 2018

I completely forgot that Alpine Linux is based on musl libc and not on GNU libc and thus it's not a GNU/Linux distribution. Manylinux supports only GNU/Linux. Pip and other python packaging tools do not provide tools to build or distribute binary packages for musl based Linux distributions. I'm afraid I can't provide such packages.

I recommend to build everything from scratch or to use the package manager of Alpine to install python packages.

You can use this hack pypa/pip#3969 to force the installation of manylinux packages, but there are no guarantees that the packages work: ABI differences, version differences etc. will most likely cause major issues at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants