Thursday, 15 January 2015

python - Django and Pillow -


In my demo project, I try to run the server with:

  Python manage.py runner 9000  

but I have this error:

Errors:

api.NameOfProject.profile_picture: ( Fields.E210) Can not use ImageField because Cushion is not installed Signal: Go pillow or "pip installation pillow" to run the command.

api.photo.photo: (fields.E210) Can not use ImageField because the pillow is not installed. Hint: Get the pillow on or run the "PP installation pillow"

I am installing pillow on my Mac OSX system:

  pip install pillow  

but this same ... and I tried to install even with homebrew ...

such a problem , And my solution was very simple:

Clearly compiled PIL and pillow can not be together. If you want to use a pillow, first uninstall PIL and install the pillow

If you are on Mac, then you have to install some libraries like a decoction . The sequence of steps outlined below is:

$ pip uninstall PIL $ exchange liquor libtiff libjpeg webp little-cms2 $ pip installed pillow

To check whether the pillow is ready to be installed and used, open the Python interpreter and try importing the following:

  & gt; & Gt; & Gt; Image from PIL Import  

* Note that the library still says PIL, but now it is importing from pillow instead of a public interest petition.

If you are able to import successfully, then you are good to go (in all the possibilities you will not have to worry about the pathstone or 32/64-bit installation)

< P> Source:


No comments:

Post a Comment