ImportError: The _imaging C module is not installed

219 views
Skip to first unread message

kcrisman

unread,
Jun 15, 2010, 12:50:58 PM6/15/10
to sage-devel
I haven't posted about this before, but on my OSX 10.6 MacBook Pro, I
have consistently gotten this error when doing doctesting of sage/plot/
plot3d/base.pyx. Built from scratch, doesn't matter. I figured it is
just my computer, but figured I'd ask if anyone else has seen
something like this. If not, I assume it's something I did wrong
without knowing it.

Thanks,
- kcrisman

Justin C. Walker

unread,
Jun 15, 2010, 1:14:35 PM6/15/10
to sage-...@googlegroups.com

I have a new MBP running 10.6.3. I built 4.4.3 from scratch, no
problems, and all tests, including this one, completed without error.
As a check, I just reran your specific test, and it happily completed
w/o error.

HTH

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
--
Democracy is two wolves and a lamb
voting on what to have for lunch.
Liberty is a well-armed lamb contesting
the vote.

kcrisman

unread,
Aug 2, 2010, 12:34:20 PM8/2/10
to sage-devel


On Jun 15, 1:14 pm, "Justin C. Walker" <jus...@mac.com> wrote:
> On Jun 15, 2010, at 09:50 ,kcrismanwrote:
>
> > I haven't posted about this before, but on my OSX 10.6 MacBook Pro, I
> > have consistently gotten this error when doing doctesting ofsage/
> > plot/
> > plot3d/base.pyx.  Built from scratch, doesn't matter.  I figured it is
> > just my computer, but figured I'd ask if anyone else has seen
> > something like this.  If not, I assume it's something I did wrong
> > without knowing it.
>
> I have a new MBP running 10.6.3.  I built 4.4.3 from scratch, no  
> problems, and all tests, including this one, completed without error.  
> As a check, I just reran your specific test, and it happily completed  
> w/o error.
>

I think this may be related -
http://stackoverflow.com/questions/1867250/having-trouble-installing-pil-in-snow-leopard
- as I seem to have the same multiple libjpeg issue as in
http://trac.sagemath.org/sage_trac/ticket/7344 .

Is this something that should be considered a 'real error'? Note that
I have no idea what libjpeg my build uses.

- kcrisman

John H Palmieri

unread,
Aug 2, 2010, 1:38:45 PM8/2/10
to sage-devel


On Aug 2, 9:34 am, kcrisman <kcris...@gmail.com> wrote:
> On Jun 15, 1:14 pm, "Justin C. Walker" <jus...@mac.com> wrote:
>
> > On Jun 15, 2010, at 09:50 ,kcrismanwrote:
>
> > > I haven't posted about this before, but on my OSX 10.6 MacBook Pro, I
> > > have consistently gotten this error when doing doctesting ofsage/
> > > plot/
> > > plot3d/base.pyx.  Built from scratch, doesn't matter.  I figured it is
> > > just my computer, but figured I'd ask if anyone else has seen
> > > something like this.  If not, I assume it's something I did wrong
> > > without knowing it.
>
> > I have a new MBP running 10.6.3.  I built 4.4.3 from scratch, no  
> > problems, and all tests, including this one, completed without error.  
> > As a check, I just reran your specific test, and it happily completed  
> > w/o error.
>
> I think this may be related -http://stackoverflow.com/questions/1867250/having-trouble-installing-...
> - as I seem to have the same multiple libjpeg issue as inhttp://trac.sagemath.org/sage_trac/ticket/7344.
>
> Is this something that should be considered a 'real error'?  Note that
> I have no idea what libjpeg my build uses.

I've seen this before, and Georg Weber suggested that I set

export SAGE_BINARY_BUILD='yes'

Then you have to rebuild the pil spkg, I think. See

<http://groups.google.com/group/sage-devel/browse_frm/thread/
48f720062cc4e38b/ff817dfb819e5ceb?lnk=gst&q=_imaging
+palmieri#ff817dfb819e5ceb>.

--
John

kcrisman

unread,
Aug 2, 2010, 2:01:03 PM8/2/10
to sage-devel
Great, this is exactly what I had figured was going on now. It is
very unfortunate that PIL does this. But at any rate I am making sure
these tickets have that thread referenced, which they currently
don't.

Also, what other effects will SAGE_BINARY_BUILD have on a source
build? After all, I'm not distributing the binary I make! It would
be nice to not have to deal with this, but since I don't use PIL it
doesn't matter that much to me.

- kcrisman

John H Palmieri

unread,
Aug 2, 2010, 2:05:10 PM8/2/10
to sage-devel


On Aug 2, 11:01 am, kcrisman <kcris...@gmail.com> wrote:
> Great, this is exactly what I had figured was going on now.  It is
> very unfortunate that PIL does this.  But at any rate I am making sure
> these tickets have that thread referenced, which they currently
> don't.
>
> Also, what other effects will SAGE_BINARY_BUILD have on a source
> build?  After all, I'm not distributing the binary I make!  It would
> be nice to not have to deal with this, but since I don't use PIL it
> doesn't matter that much to me.

Starting very recently, Sage environment variables are now documented
in the Sage installation guide. See

<http://sagemath.org/doc/installation/source.html#environment-
variables>

When I was looking into this, I only found SAGE_BINARY_BUILD in the
pil package, so I think it has no other effect.

--
John

kcrisman

unread,
Aug 2, 2010, 2:17:18 PM8/2/10
to sage-devel
Having two environment variables used by only one package seems odd as
well ;) Maybe we should just include the libjpeg or whatever -
otherwise it's yet another dependency for Sage to test right, though
as noted it only impacts my testing, not any use I can think of for
me.

- kcrisman

Tim Joseph Dumol

unread,
Aug 2, 2010, 2:31:35 PM8/2/10
to sage-...@googlegroups.com
Hi,

SAGE_BINARY_BUILD was introduced as a compromise when it was decided
that libjpeg and libtiff were to be introduced first as optional
packages, since PIL is a standard package. Without SAGE_BINARY_BUILD
set, binary distributions have PIL link with libjpeg and libtiff as
shared libraries, which may not exist in client machines. (c.f.
http://groups.google.com/group/sage-devel/msg/6ea0a0e0a0a2a71a and
http://trac.sagemath.org/sage_trac/ticket/7273)

The libjpeg and libtiff packages are at
http://trac.sagemath.org/sage_trac/ticket/7344 and
http://trac.sagemath.org/sage_trac/ticket/7345. However, they have
some issues that I cannot attend to right now due to time constraints.

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

--
Tim Joseph Dumol <tim (at) timdumol (dot) com>
http://timdumol.com

Tim Joseph Dumol

unread,
Aug 17, 2010, 2:18:38 PM8/17/10
to sage-...@googlegroups.com
New packages are up at #7344 and #7345
(http://trac.sagemath.org/sage_trac/ticket/7344 and
http://trac.sagemath.org/sage_trac/ticket/7345) for review that should
hopefully work for all platforms.

kcrisman

unread,
Aug 17, 2010, 8:09:47 PM8/17/10
to sage-devel


On Aug 17, 2:18 pm, Tim Joseph Dumol <t...@timdumol.com> wrote:
> New packages are up at #7344 and #7345
> (http://trac.sagemath.org/sage_trac/ticket/7344andhttp://trac.sagemath.org/sage_trac/ticket/7345) for review that should
> hopefully work for all platforms.

Question - are these under review as optional or standard packages? I
suppose ideally one would include a patch that gave a hint to install
these as optional packages if one encountered this problem (which
occurred to me again today, only failed test on 4.5.3.alpha1!).

Thanks,
- kcrisman

Tim Joseph Dumol

unread,
Aug 18, 2010, 9:46:55 AM8/18/10
to sage-...@googlegroups.com
They are under review as optional packages. In order to become
standard packages, they must be voted in here at sage-devel, and must
have 2 maintainers (iirc[1]).

[1] http://groups.google.com/group/sage-devel/msg/6ea0a0e0a0a2a71a

kcrisman

unread,
Aug 18, 2010, 10:29:34 AM8/18/10
to sage-devel


On Aug 18, 9:46 am, Tim Joseph Dumol <t...@timdumol.com> wrote:
> They are under review as optional packages. In order to become

Okay, as suspected - it just doesn't say this on the tickets.

> > suppose ideally one would include a patch that gave a hint to install
> > these as optional packages if one encountered this problem (which
> > occurred to me again today, only failed test on 4.5.3.alpha1!).

This I don't think has happened yet, though - on the ticket, sounds
like this is an upstream problem?

- kcrisman

Tim Joseph Dumol

unread,
Aug 18, 2010, 11:16:11 AM8/18/10
to sage-...@googlegroups.com
It seems to be a problem with dynamic linking in Mac OS X 10.6. I
personally don' t know, since I don't own a Mac.

Reply all
Reply to author
Forward
0 new messages