-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Fixed setup.py when missing libjpeg #7840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vfdev-5 , LGTM if green with a few comments. Maybe we should just merge it and completely re-write that part of the readme in another PR. We should remove mentions of accimage and also be clear that jpeg-turbo is preferred now.
`TORCHVISION_INCLUDE` and `TORCHVISION_LIBRARY`, respectively. | ||
**Notes:** `libpng` and `libjpeg` are optional dependencies. If any of them is available on the system, | ||
torchvision will provide encoding/decoding image functionalities from `torchvision.io.image`. | ||
When building torchvision from source, `libpng` and `libjpeg` can be found on the standard library locations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should say that. It depends on whether the user installed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you detail what is incorrect here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't know whether those libraries can be found on the standard library locations. If users didn't install them, then they won't be found there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think I need to rephrase the sentence I wrote: "libpng
and libjpeg
are first searched on the standard library locations"
**Notes:** `libpng` and `libjpeg` must be available at compilation time in order to be available. Make sure that it is | ||
available on the standard library locations, otherwise, add the include and library paths in the environment variables | ||
`TORCHVISION_INCLUDE` and `TORCHVISION_LIBRARY`, respectively. | ||
**Notes:** `libpng` and `libjpeg` are optional dependencies. If any of them is available on the system, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to clarify that libjpeg and libpng are optional, but I don't think we need to remove that sentence:
libpng
andlibjpeg
must be available at compilation time in order to be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I do not understand what you ask. Libs are optional and this sentence "libpng and libjpeg must be available at compilation time in order to be available." does not make sense (without speaking that it is unclear what it is exactly "in order be available")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the sentence means
libjpeg and libpng need to be available at compile time when you build from source.
We don't need to remove it
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Thanks for the fix @vfdev-5 , I'll submit a PR soon to rework our README a bit, as other parts of it also need an update |
Summary: Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com> Reviewed By: matteobettini Differential Revision: D48642325 fbshipit-source-id: 2eac112d0e7387bf9b7a10624a397aae09e17e61
This PR fixes the error when installing torchvision from source on a system without libjpeg (e.g. GH Codespaces)