如何让cx_Oracle 和PIL并存

在上一篇OS X下配置 cx_Oracle,让python能连接Oracle里讲了怎么在OS X里配置Oracle连接之后,新问题来了:以前装的PIL,当import _imaging时错:


 File "", line 1, in 
ImportError: dlopen(/Library/Python/2.6/site-packages/PIL/_imaging.so, 2): \
Symbol not found: _jpeg_resync_to_restart
  Referenced from: /Library/Python/2.6/site-packages/PIL/_imaging.so
  Expected in: flat namespace
 in /Library/Python/2.6/site-packages/PIL/_imaging.so

因为把python降到32位,PIL的依赖项libjpeg没法用了。。。

到这里去下一个32位和64位下都能用的libjpeg包,http://ethan.tira-thompson.com/Mac_OS_X_Ports.html,安装之。

删除PIL,重装,搞定。不会重装的话,这个链接的后半部分(忽略前半部分libjpeg安装)告诉你怎么安装:http://laonan.net/blog/34/

不过别高应的太早,MySQLdb又没法用了。。。。

我决定启一个虚拟机到ubuntu里去开发跟cx_Oracle有关的东东了,Oracle真是让人崩溃。

参考:http://www.arnebrodowski.de/blog/libjpeg-symbol-not-found-error-with-pil-on-10.6-snow-leopard.html

Mac cx_Oracle PIL _imaging
阅读(3322) 评论(0) 2012-10-18
输入类似这样的地址 "name@something.com"
输入类似这样的地址"http://someaddress.com"
验证码 不区分大小写(看不清)