feldroy / django-crash-course

The issue tracker and code repository for Django Crash Course
https://www.feldroy.com/products/django-crash-course
144 stars 30 forks source link

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

Open fullstackross opened 2 years ago

fullstackross commented 2 years ago

Location within the Book

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 commented 2 years ago

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!