Bug #5012

Problem with PIL in OS X

Added by dandan over 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2013-02-23
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

Revision 2059 broke something for me. I am using Mac OS 10.8. Seems that PIL is no longer found. This does not happen with earlier revisions of NML on my system.

This is the error I get when running nmlc:
Traceback (most recent call last):
File "/usr/local/bin/nmlc", line 8, in <module>
load_entry_point('nml==0.3.0.r2063-9e5e21dc5219', 'console_scripts', 'nmlc')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 318, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2221, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "build/bdist.macosx-10.8-intel/egg/nml/main.py", line 19, in <module>
File "build/bdist.macosx-10.8-intel/egg/nml/parser.py", line 17, in <module>
File "build/bdist.macosx-10.8-intel/egg/nml/ast/font.py", line 17, in <module>
File "build/bdist.macosx-10.8-intel/egg/nml/actions/action12.py", line 17, in <module>
File "build/bdist.macosx-10.8-intel/egg/nml/actions/real_sprite.py", line 20, in <module>
ImportError: No module named PIL

fix.patch Magnifier - try to import Image both from PIL and directly (as done pre-r2059) (1.8 KB) Alberth, 2013-08-16 18:38

Associated revisions

Revision 2094:763d89426ca1
Added by planetmaker almost 7 years ago

Fix #5012: Try harder to import the image library from PIL or pillow (Alberth)

Revision 2113:03de26b64471
Added by planetmaker almost 7 years ago

Fix #5012: Try harder to import the image library from PIL or pillow (Alberth)

History

#1 Updated by planetmaker about 7 years ago

Hm, it still works for me on OSX 10.6 - but my setup likely is somewhat special. So my question for you:
By which means do/did you obtain, update and install NML and PIL on your system?

#2 Updated by planetmaker about 7 years ago

  • Status changed from New to Confirmed

Note on how to reproduce on my system (OSX 10.6):
- (re)move /Library/Python/PIL (probably installed by macports?)
- /Libary/Python/PIL/PIL-1.1.7... (as installed by easy_install) will NOT be recognized

#3 Updated by Alberth almost 7 years ago

Does the attached patch fix the problem?

#4 Updated by planetmaker almost 7 years ago

  • Status changed from Confirmed to Closed
  • % Done changed from 0 to 100

Applied in changeset 763d89426ca1.

Also available in: Atom PDF