Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIL on OS X: ImportError: The _imaging C module is not installed #10059

Closed
qed777 mannequin opened this issue Oct 2, 2010 · 5 comments
Closed

PIL on OS X: ImportError: The _imaging C module is not installed #10059

qed777 mannequin opened this issue Oct 2, 2010 · 5 comments

Comments

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 2, 2010

The Python Imaging Library's _imaging module is not installed on some OS X systems. This causes doctest failures in sage/plot/plot3d/base.pyx:

sage -t  -long devel/sage/sage/plot/plot3d/base.pyx
**********************************************************************
File "/Users/Sage/sage-4.6.alpha0/devel/sage-main/sage/plot/plot3d/base.pyx", line 1160:
    sage: G.save(f)
Exception raised:
    Traceback (most recent call last):
      File "/Users/Sage/sage-4.6.alpha0/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/Users/Sage/sage-4.6.alpha0/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/Users/Sage/sage-4.6.alpha0/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_35[4]>", line 1, in <module>
        G.save(f)###line 1160:
    sage: G.save(f)
      File "base.pyx", line 1198, in sage.plot.plot3d.base.Graphics3d.save (sage/plot/plot3d/base.c:11722)
        Image.open(out_filename).save(filename)
      File "/Users/Sage/sage-4.6.alpha0/local/lib/python2.6/site-packages/PIL/Image.py", line 1372, in save
        self.load()
      File "/Users/Sage/sage-4.6.alpha0/local/lib/python2.6/site-packages/PIL/ImageFile.py", line 155, in load
        self.load_prepare()
      File "/Users/Sage/sage-4.6.alpha0/local/lib/python2.6/site-packages/PIL/ImageFile.py", line 223, in load_prepare
        self.im = Image.core.new(self.mode, self.size)
      File "/Users/Sage/sage-4.6.alpha0/local/lib/python2.6/site-packages/PIL/Image.py", line 36, in __getattr__
        raise ImportError("The _imaging C module is not installed")
    ImportError: The _imaging C module is not installed
[...]

See also: sage-devel, sage-release.

Related tickets: #7344, #9864.

CC: @jhpalmieri @RalphieBoy @kcrisman @TimDumol

Component: packages: standard

Issue created by migration from https://trac.sagemath.org/ticket/10059

@qed777 qed777 mannequin added this to the sage-5.11 milestone Oct 2, 2010
@kcrisman
Copy link
Member

kcrisman commented Mar 6, 2012

comment:1

Ah, now that I feel confident using SAGE_CHECK=yes, I see that this is going to bite in another place.


Code block begin...end
Plot 5
Code block begin...end
Plot 6
Inline formula 13
Code block begin...Traceback (most recent call last):
  File "example.sagetex.py", line 192, in <module>
<snip>
    raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed
end
Plot 7
  saving sage-plots-for-example.tex/plot-7.eps failed; saving to sage-plots-for-example.tex/plot-7.png instead.

**** Error in Sage code on line 278 of example.tex! Traceback follows.

**** Running Sage on example.sage failed! Fix example.tex and try again.
Error running Sage on example.sagetex.sage!

real	0m53.056s
user	0m13.153s
sys	0m4.808s
************************************************************************
Error testing package sagetex-2.3.3.p2
************************************************************************

So now there are two places this causes failure - plot/plot3d/base.pyx and the sagetex package. Another reason to try #7344, perhaps.

@jhpalmieri
Copy link
Member

comment:2

Have you tried building Sage with SAGE_BINARY_BUILD=yes? (See the [http://sagemath.org/doc/installation/source.html#environment-variables installation guide and the pil spkg.) That fixes some problems like this for me. It would be nice to not have to do this, of course...

@kcrisman
Copy link
Member

kcrisman commented Mar 6, 2012

comment:3

No, I haven't. On the other hand, I don't have one of those other tickets installed anyway.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@vbraun
Copy link
Member

vbraun commented Aug 11, 2014

comment:8

We use now Pillow instead of PIL; Its likely that this is fixed. I haven't seen such an issue on the build bot.

I suggest to close it as fixed.

@vbraun vbraun removed this from the sage-6.4 milestone Aug 11, 2014
@kcrisman
Copy link
Member

comment:9

I haven't seen it for a long time either, so I suggest we close it and open a new one as well if it comes up again, since it won't be quite the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants