django-crash-course icon indicating copy to clipboard operation
django-crash-course copied to clipboard

ERROR: Command errored out with exit status 1: - Pillow

Open fullstackross opened this issue 3 years ago • 1 comments

Location within the Book

  • Book order number: 0108617332 - "A Wedge of Django"
  • Book build date (Is the date on page 1): 2021-06-30
  • Book format (PDF, Epub or Mobi): PDF
  • Chapter or Appendix: Chapter 19
  • Section: 19.2
  • Subsection: Install the Dependencies
  • What operating system are you using:
    • [ ] MacOS Monterey (M1 Apple Silicon)

Description

When I enter the following:

 pip install -r requirements/local.txt

I receive this error that I have been unable to resolve (Shortened for brevity)

ERROR: Command errored out with exit status 1:

 The headers or library files could not be found for jpeg,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
 

Attempted Solutions

https://github.com/feldroy/django-crash-course/issues/56

fullstackross avatar Jul 07 '22 23:07 fullstackross

I was able to resolve the error by updating Pillow to 9.0.0 in the below file as follows:

Path:   requirements / base.txt 

pytz==2020.1  # https://github.com/stub42/pytz
python-slugify==4.0.1  # https://github.com/un33k/python-slugify
Pillow==9.0.0  # https://github.com/python-pillow/Pillow
whitenoise==5.2.0  # https://github.com/evansd/whitenoise
unidecode==1.1.1 # https://pypi.org/project/Unidecode/

Would appreciate input on whether this is a suitable fix when able. Thank you!

fullstackross avatar Jul 08 '22 00:07 fullstackross