<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: libjpeg and Python Imaging (PIL) on Snow Leopard</title>
	<atom:link href="http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/feed/" rel="self" type="application/rss+xml" />
	<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/</link>
	<description>Rich Atkinson&#039;s Personal Blog</description>
	<lastBuildDate>Fri, 02 Jul 2010 03:13:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Karl</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-501</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Wed, 30 Jun 2010 17:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-501</guid>
		<description>building libjpeg, and then using pip to install pil worked, but I had to tweak the command a bit:


$ cp /usr/share/libtool/config/config.sub .
$ cp /usr/share/libtool/config/config.guess .
$ CC=&quot;gcc -arch i386&quot; ./configure --enable-shared --enable-static
$ make
$ sudo make install

$ sudo pip install pil</description>
		<content:encoded><![CDATA[<p>building libjpeg, and then using pip to install pil worked, but I had to tweak the command a bit:</p>
<p>$ cp /usr/share/libtool/config/config.sub .<br />
$ cp /usr/share/libtool/config/config.guess .<br />
$ CC=&#8221;gcc -arch i386&#8243; ./configure &#8211;enable-shared &#8211;enable-static<br />
$ make<br />
$ sudo make install</p>
<p>$ sudo pip install pil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Build PIL on Snow Leopard &#124; Blog site of Chris Ivens</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-453</link>
		<dc:creator>Build PIL on Snow Leopard &#124; Blog site of Chris Ivens</dc:creator>
		<pubDate>Sat, 27 Mar 2010 12:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-453</guid>
		<description>[...] I tried the dmg file from http://ethan.tira-thompson.org/Mac_OS_X_Ports.html and this too http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/ [...]</description>
		<content:encoded><![CDATA[<p>[...] I tried the dmg file from <a href="http://ethan.tira-thompson.org/Mac_OS_X_Ports.html">http://ethan.tira-thompson.org/Mac_OS_X_Ports.html</a> and this too <a href="http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/">http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-432</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Tue, 03 Nov 2009 20:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-432</guid>
		<description>I’ve heard there are some wildlife groups trying to get Apple to do more stuff with the actual S.L.’s lol. I don’t know- people are saying it’s good PR for Apple- they should jump on that.</description>
		<content:encoded><![CDATA[<p>I’ve heard there are some wildlife groups trying to get Apple to do more stuff with the actual S.L.’s lol. I don’t know- people are saying it’s good PR for Apple- they should jump on that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-429</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Thu, 29 Oct 2009 21:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-429</guid>
		<description>I solved this issue (for me, anyway) today.

- Make sure that you are NOT using GCC 4.0. That means those export lines in your .bash_profile file that you needed to get MySQLdb working now need to go away.
- I used libjpeg 7 (http://www.ijg.org/files/jpegsrc.v7.tar.gz), even though I doubt it was necessary.
- Before installing PIL but after installing libjpeg, I changed the &quot;JPEG_ROOT = None&quot; line in my setup.py file to &quot;JPEG_ROOT = libinclude(&quot;/usr/local&quot;)&quot;</description>
		<content:encoded><![CDATA[<p>I solved this issue (for me, anyway) today.</p>
<p>- Make sure that you are NOT using GCC 4.0. That means those export lines in your .bash_profile file that you needed to get MySQLdb working now need to go away.<br />
- I used libjpeg 7 (<a href="http://www.ijg.org/files/jpegsrc.v7.tar.gz">http://www.ijg.org/files/jpegsrc.v7.tar.gz</a>), even though I doubt it was necessary.<br />
- Before installing PIL but after installing libjpeg, I changed the &#8220;JPEG_ROOT = None&#8221; line in my setup.py file to &#8220;JPEG_ROOT = libinclude(&#8220;/usr/local&#8221;)&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-428</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Thu, 29 Oct 2009 21:10:03 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-428</guid>
		<description>I&#039;m stuck with the same issue being described by most others immediately above me.

Has anyone found a solution? (I will post if I figure it out...)</description>
		<content:encoded><![CDATA[<p>I&#8217;m stuck with the same issue being described by most others immediately above me.</p>
<p>Has anyone found a solution? (I will post if I figure it out&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giacecco</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-427</link>
		<dc:creator>Giacecco</dc:creator>
		<pubDate>Thu, 29 Oct 2009 20:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-427</guid>
		<description>Remi: if you are still reading this, I am trying following your instructions because they are slightly different than everything I have tried so far, but I&#039;ve bumped in an error already when making jpeg-7. The output I get is http://drop.io/npalbw9 . Did you have this, too? It does not really look like I can do a make install after this!</description>
		<content:encoded><![CDATA[<p>Remi: if you are still reading this, I am trying following your instructions because they are slightly different than everything I have tried so far, but I&#8217;ve bumped in an error already when making jpeg-7. The output I get is <a href="http://drop.io/npalbw9">http://drop.io/npalbw9</a> . Did you have this, too? It does not really look like I can do a make install after this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giacecco</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-425</link>
		<dc:creator>Giacecco</dc:creator>
		<pubDate>Thu, 29 Oct 2009 07:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-425</guid>
		<description>In case it was interesting, I have solved the “-Wno-long-double” problem and now I am back together with everyone else at the _jpeg_resync_to_restart error!

I also tried the otool trick, but it shows no dependency at all on libjpeg! During PIL compilation, the output correctly says that Jpeg support is present.</description>
		<content:encoded><![CDATA[<p>In case it was interesting, I have solved the “-Wno-long-double” problem and now I am back together with everyone else at the _jpeg_resync_to_restart error!</p>
<p>I also tried the otool trick, but it shows no dependency at all on libjpeg! During PIL compilation, the output correctly says that Jpeg support is present.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jesse</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-424</link>
		<dc:creator>jesse</dc:creator>
		<pubDate>Wed, 28 Oct 2009 14:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-424</guid>
		<description>I&#039;ve been banging my head against the wall with this problem for a few days, but I finally got it worked out.

First of all, my system is running python in 32bit mode with the same configuration as Stefan&#039;s shown above.

The key to fixing this was noticing that the libraries in /opt/local were always getting included and taking precedence over any other libjpeg libraries in the system (same with zlib). First I uninstalled all libjpeg related ports, and then installed libjpeg from here: http://www.ijg.org/files/jpegsrc.v7.tar.gz

The output from rebuilding PIL showed &quot;ok&quot; for support of all the functionality, but when I imported _imaging I got an error. But it was a new error! Symbol not found: _deflate.

After discovering that it related to zlib, I uninstalled zlib from ports and freetype. I got zlib-1.2.3, which installed fine from source. Then I tried the newest version of freetype, but it wouldn&#039;t build. The readme from PIL suggests freetype &gt;= 2.1.3, so I chose 2.1.10. It built and installed fine from source.

With all my libraries now in /usr/local, I rebuilt PIL (using libconfig(&quot;/usr/local&quot;) for jpeg, freetype and zlib), and everything went fine. Installed PIL, fired up python interpreter and imported _imaging, and no error!!!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been banging my head against the wall with this problem for a few days, but I finally got it worked out.</p>
<p>First of all, my system is running python in 32bit mode with the same configuration as Stefan&#8217;s shown above.</p>
<p>The key to fixing this was noticing that the libraries in /opt/local were always getting included and taking precedence over any other libjpeg libraries in the system (same with zlib). First I uninstalled all libjpeg related ports, and then installed libjpeg from here: <a href="http://www.ijg.org/files/jpegsrc.v7.tar.gz">http://www.ijg.org/files/jpegsrc.v7.tar.gz</a></p>
<p>The output from rebuilding PIL showed &#8220;ok&#8221; for support of all the functionality, but when I imported _imaging I got an error. But it was a new error! Symbol not found: _deflate.</p>
<p>After discovering that it related to zlib, I uninstalled zlib from ports and freetype. I got zlib-1.2.3, which installed fine from source. Then I tried the newest version of freetype, but it wouldn&#8217;t build. The readme from PIL suggests freetype &gt;= 2.1.3, so I chose 2.1.10. It built and installed fine from source.</p>
<p>With all my libraries now in /usr/local, I rebuilt PIL (using libconfig(&#8220;/usr/local&#8221;) for jpeg, freetype and zlib), and everything went fine. Installed PIL, fired up python interpreter and imported _imaging, and no error!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giacecco</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-420</link>
		<dc:creator>Giacecco</dc:creator>
		<pubDate>Sun, 25 Oct 2009 12:10:34 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-420</guid>
		<description>Thank you so much for publishing your solution to this. 

I tried doing the same myself but it did not work for me... actually I got into more trouble than the one I started from! 

Now building PIL creates MacOS 10.3 binaries

$ sudo python2.5 setup.py build
running build
running build_py
creating build/lib.macosx-10.3-i386-2.5
copying PIL/__init__.py -&gt; build/lib.macosx-10.3-i386-2.5
copying PIL/ArgImagePlugin.py -&gt; build/lib.macosx-10.3-i386-2.5
copying PIL/BdfFontFile.py -&gt; build/lib.macosx-10.3-i386-2.5
(...)

and then fails with:

cc1: error: unrecognized command line option &quot;-Wno-long-double&quot;

I believe there may be confusion between Snow Leopard&#039;s own Python and the one I installed from http://www.python.org . I could not use the default one because I need my code to work on 2.5 . Any advice?</description>
		<content:encoded><![CDATA[<p>Thank you so much for publishing your solution to this. </p>
<p>I tried doing the same myself but it did not work for me&#8230; actually I got into more trouble than the one I started from! </p>
<p>Now building PIL creates MacOS 10.3 binaries</p>
<p>$ sudo python2.5 setup.py build<br />
running build<br />
running build_py<br />
creating build/lib.macosx-10.3-i386-2.5<br />
copying PIL/__init__.py -&gt; build/lib.macosx-10.3-i386-2.5<br />
copying PIL/ArgImagePlugin.py -&gt; build/lib.macosx-10.3-i386-2.5<br />
copying PIL/BdfFontFile.py -&gt; build/lib.macosx-10.3-i386-2.5<br />
(&#8230;)</p>
<p>and then fails with:</p>
<p>cc1: error: unrecognized command line option &#8220;-Wno-long-double&#8221;</p>
<p>I believe there may be confusion between Snow Leopard&#8217;s own Python and the one I installed from <a href="http://www.python.org">http://www.python.org</a> . I could not use the default one because I need my code to work on 2.5 . Any advice?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norman</title>
		<link>http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/comment-page-1/#comment-419</link>
		<dc:creator>Norman</dc:creator>
		<pubDate>Sun, 25 Oct 2009 06:06:49 +0000</pubDate>
		<guid isPermaLink="false">http://jetfar.com/?p=234#comment-419</guid>
		<description>I am not very savvy UNIX user so I tried the steps as described . When I try to install I get this:

SockMonkey:jpeg-6b norman$ sudo make install
Password:
/usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h
/usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h
/usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h
/usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h
./libtool --mode=install /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la
/usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la
/usr/bin/install -c .libs/libjpeg.a /usr/local/lib/libjpeg.a
ranlib /usr/local/lib/libjpeg.a
chmod 644 /usr/local/lib/libjpeg.a
------------------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

To link against installed libraries in a given directory, LIBDIR,
you must use the `-LLIBDIR&#039; flag during linking.

 You will also need to do one of the following:

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
------------------------------------------------------------------------------
./libtool --mode=install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg
/usr/bin/install -c cjpeg /usr/local/bin/cjpeg
install: /usr/local/bin/cjpeg: No such file or directory
make: *** [install] Error 71
SockMonkey:jpeg-6b norman$ 
*******************************************


I appreciate any help.</description>
		<content:encoded><![CDATA[<p>I am not very savvy UNIX user so I tried the steps as described . When I try to install I get this:</p>
<p>SockMonkey:jpeg-6b norman$ sudo make install<br />
Password:<br />
/usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h<br />
/usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h<br />
/usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h<br />
/usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h<br />
./libtool &#8211;mode=install /usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la<br />
/usr/bin/install -c libjpeg.la /usr/local/lib/libjpeg.la<br />
/usr/bin/install -c .libs/libjpeg.a /usr/local/lib/libjpeg.a<br />
ranlib /usr/local/lib/libjpeg.a<br />
chmod 644 /usr/local/lib/libjpeg.a<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Libraries have been installed in:<br />
   /usr/local/lib</p>
<p>To link against installed libraries in a given directory, LIBDIR,<br />
you must use the `-LLIBDIR&#8217; flag during linking.</p>
<p> You will also need to do one of the following:</p>
<p>See any operating system documentation about shared libraries for<br />
more information, such as the ld(1) and ld.so(8) manual pages.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
./libtool &#8211;mode=install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg<br />
/usr/bin/install -c cjpeg /usr/local/bin/cjpeg<br />
install: /usr/local/bin/cjpeg: No such file or directory<br />
make: *** [install] Error 71<br />
SockMonkey:jpeg-6b norman$<br />
*******************************************</p>
<p>I appreciate any help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
