The _imagingft C module is not installed

Probleme bei der Installation?
Antworten
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

Python 2.7.1 (32Bit) frisch auf Win7 64Bit installiert. PIL-1.1.7.win32-py2.7 drauf und dann das:

Code: Alles auswählen

...
    font_obj = ImageFont.truetype('arial.ttf', 12)
  File "C:\Python27\lib\site-packages\PIL\ImageFont.py", line 218, in truetype
    return FreeTypeFont(filename, size, index, encoding)
  File "C:\Python27\lib\site-packages\PIL\ImageFont.py", line 134, in __init__
    self.font = core.getfont(file, size, index, encoding)
  File "C:\Python27\lib\site-packages\PIL\ImageFont.py", line 34, in __getattr__
    raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed
Das hab ich gefunden: http://effbot.org/zone/pil-imaging-not-installed.htm

Aber das geht:
C:\Python27>python
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import _imaging
>>>
Jemand eine Idee?

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

Python 2.7 deinstalliert und 2.6.6 drauf mit PIL v1.1.7 und das selbe Problem.

PIL 1.1.7 deinstalliert und v1.1.6 drauf (gibt's nur für Python 2.6.x) und geht.

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Xynon1
User
Beiträge: 1267
Registriert: Mittwoch 15. September 2010, 14:22

Bei mir geht es mit WinXP 32bit, Python 2.7.1 und PIL 1.1.7, muss wohl an der 64bit Version liegen. :P
Traue keinem Computer, den du nicht aus dem Fenster werfen kannst.
Xynon auf GitHub
Benutzeravatar
jens
Python-Forum Veteran
Beiträge: 8502
Registriert: Dienstag 10. August 2004, 09:40
Wohnort: duisburg
Kontaktdaten:

Hab gerade das selbe Problem wieder :(

Diesmal ActivePython-2.7.2.5-win32-x86.msi installiert und über den "PyPM 1.3.4 (Python Package Manager)" PIL installiert... (Dabei wird PIL von Active State Servern installiert).

Selbe Fehler:

Code: Alles auswählen

  File "C:\Users\jens\AppData\Roaming\Python\Python27\site-packages\PIL\ImageFont.py", line 218, in truetype
    return FreeTypeFont(filename, size, index, encoding)
  File "C:\Users\jens\AppData\Roaming\Python\Python27\site-packages\PIL\ImageFont.py", line 134, in __init__
    self.font = core.getfont(file, size, index, encoding)
  File "C:\Users\jens\AppData\Roaming\Python\Python27\site-packages\PIL\ImageFont.py", line 34, in __getattr__
    raise ImportError("The _imagingft C module is not installed")
ImportError: The _imagingft C module is not installed
Bei http://stackoverflow.com/questions/4011 ... -installed steht:
Your installed PIL was compiled without libfreetype.

You can get precompiled installer of PIL (compiled with libfreetype) here (and many other precompiled Python C Modules)

http://www.lfd.uci.edu/~gohlke/pythonlibs/
Muß ich mal probieren...


Noch ein work-a-round ist hier: http://code.activestate.com/lists/python-list/197705/


Alles irgendwie unschön... :evil:

GitHub | Open HUB | Xing | Linked in
Bitcoins to: 1JEgSQepxGjdprNedC9tXQWLpS424AL8cd
Benutzeravatar
darktrym
User
Beiträge: 784
Registriert: Freitag 24. April 2009, 09:26

PIL geht auch, mittlerweile, auf der 3er, hach ist das herrlich.
„gcc finds bugs in Linux, NetBSD finds bugs in gcc.“[Michael Dexter, Systems 2008]
Bitbucket, Github
Antworten