Gcc-4.0 Error When Building _imaging Extension For Pil
Solution 1:
Many if not all of your problems (hopefully) can be solved by using Pillow instead. PIL development was just kind of halted a while back, and unfortunately the code wasn't forwards-compatible in any way, so as compilers and Python matured, errors crept in. The Pillow fork is stable, actively developed, and pretty widespread, so you can feel safe using it. Version 2.0 has a bunch of enhancements, including Python 3 support. You'll have to use from PIL import Image
instead of import Image
, though. Good luck!
Solution 2:
Wow. I hope this helps people who have the same problem in the future, because that was brutal.
The solution was to install the python.org 64-bit/32-bit installer
for Mac, as outlined in Ned Deily's answer to the question “…can't figure out the architecture type of…” problem when compiling Python C-extension with gcc.
First, I made sure that the default python was this new python (just by running python
in the shell).
Then, I reinstalled pip
, and ran pip install PIL
. And that did it!
Just to make sure, I opened up python in the shell, and imported the three modules:
>>>import PIL>>>import Image>>>import _imaging
All of them (finally) imported without errors.
Post a Comment for "Gcc-4.0 Error When Building _imaging Extension For Pil"