Why is pip installing Pillow for OS X 10.12, when I have OS X 10.11 installed?

后端 未结 2 1625
深忆病人
深忆病人 2021-01-19 01:55

When trying to import PIL (using Pillow), I get the following error:

    from PIL import ImageTk, Image
  File \"/usr/local/lib/python2.7/site-packages/PIL/I         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-19 02:32

    That sounds like the wheel uploaded to PyPI was not built for your platform correctly. Unfortunately having the wheel for a PyPI package for your platform is not a guarantee that the wheel will install or work correctly, you're at the mercy of the PyPI package maintainer in this regard.

    You should run pip uninstall Pillow, download the source directly from PyPI, build it manually and run pip install -e to install the wheel you built specifically for your machine.

提交回复
热议问题