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

imagecodecs openjpeg.h: No such file or directory #172

Closed
gerrito333 opened this issue May 10, 2020 · 6 comments
Closed

imagecodecs openjpeg.h: No such file or directory #172

gerrito333 opened this issue May 10, 2020 · 6 comments

Comments

@gerrito333
Copy link

gerrito333 commented May 10, 2020

When I run pip3 install face-alignment I get the following error:

imagecodecs/_jpeg2k.c:602:10: fatal error: openjpeg.h: No such file or directory
 #include "openjpeg.h"
          ^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for imagecodecs
@1adrianb
Copy link
Owner

If you are on ubuntu try running sudo apt-get install -y libopenjpeg-dev beforehand.

@gerrito333
Copy link
Author

Thanks for your prompt reply. Tried, but I am unable to find this package:

apt-get install -y libopenjpeg-dev
E: Unable to locate package libopenjpeg-dev

@1adrianb
Copy link
Owner

Try installing then libopenjp2-7-dev please

@gerrito333
Copy link
Author

gerrito333 commented May 10, 2020

With libopenjp2-7-dev installed, I still get this message:

imagecodecs/_jpeg2k.c:602:10: fatal error: openjpeg.h: No such file or directory
 #include "openjpeg.h"
          ^~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I am using a ubuntu18.04 docker image, I will try if switching to ubuntu16.04 helps.

@1adrianb
Copy link
Owner

That shouldn't be a problem to be honest. Try to see if you can locate where the header is and manually add if its necessary. For an example see python-pillow/Pillow#2387 (comment)

@gerrito333
Copy link
Author

gerrito333 commented May 11, 2020

Using a ubuntu16.04 with libopenjpeg-dev and other libs mentioned on https://pypi.org/project/imagecodecs/ solved it. Thanks Adrian for you support.

This issue was closed.
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

2 participants