DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th April 2011
Barakat Barakat is offline
New User
 
Join Date: Apr 2011
Posts: 3
Thanked 0 Times in 0 Posts
Default Installing python imaging on OpenBSD ? [error _imagingft C module]

Hi all,

I tried to pkg_add py-Imaging in order to install python Imaging on OpenBSD 4.8 but I got this erorr massege :

Code:
[OpenBSD]# 
[OpenBSD]# 
[OpenBSD]# python --version   
Python 2.5.4
[OpenBSD]# 
[OpenBSD]# 
[OpenBSD]# pkg_add -ivv py-Imaging
Ambiguous: choose package for py-Imaging
 a       0: <None>
         1: py-Imaging-1.1.6p0-python2.4
         2: py-Imaging-1.1.6p0-python2.5
Your choice: 2 
parsing py-Imaging-1.1.6p0-python2.5
Direct dependencies for py-Imaging-1.1.6p0-python2.5 resolve to: python-tkinter-2.5.4p5 tk-8.4.19p0 jpeg-8b python-2.5.4p5 (todo: python-tkinter-2.5.4p5 tk-8.4.19p0)
parsing python-tkinter-2.5.4p5
Direct dependencies for python-tkinter-2.5.4p5 resolve to: tk-8.4.19p0 tcl-8.4.19 python-2.5.4p5 (todo: tk-8.4.19p0)
parsing tk-8.4.19p0
Direct dependencies for tk-8.4.19p0 resolve to: tcl-8.4.19
Can't install tk-8.4.19p0 because of libraries
|library X11.13.0 not found
| not found anywhere
|library pthread-stubs.0.0 not found
| not found anywhere
|library xcb.2.1 not found
| not found anywhere
Direct dependencies for tk-8.4.19p0 resolve to: tcl-8.4.19
Full dependency tree is tcl-8.4.19
Direct dependencies for python-tkinter-2.5.4p5 resolve to: tk-8.4.19p0 tcl-8.4.19 python-2.5.4p5
Can't use string ("tk-8.4.19p0") as a HASH ref while "strict refs" in use at /usr/libdata/perl5/OpenBSD/PkgAdd.pm line 883.
[OpenBSD]# 
[OpenBSD]#
I believe that because I haven't installed X, so I decided to download Imaging-1.1.7, I've installed it succsesfuly:

Code:
[OpenBSD]# python                                                              
Python 2.5.4 (r254:67916, Aug  9 2010, 08:57:51) 
[GCC 4.2.1 20070719 ] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> import ImageFont
>>> import ImageDraw
>>>
but when I run my script, I get this error :

Code:
[OpenBSD]# 
[OpenBSD]# cat script.py | grep import 
import Image
import ImageFont
import ImageDraw
import random
import time,sys
[OpenBSD]# 
[OpenBSD]# 
[OpenBSD]# ./script.py                                                         
Traceback (most recent call last):
  File "./script.py", line 64, in <module>
    Main()
  File "./script.py", line 52, in Main
    font_image  = ImageFont.truetype(FONT_N, FONT_S)
  File "/usr/local/lib/python2.5/site-packages/PIL/ImageFont.py", line 218, in truetype
    return FreeTypeFont(filename, size, index, encoding)
  File "/usr/local/lib/python2.5/site-packages/PIL/ImageFont.py", line 134, in __init__
    self.font = core.getfont(file, size, index, encoding)
  File "/usr/local/lib/python2.5/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
[OpenBSD]# 
[OpenBSD]#
Does anyone know how to solve this problem ?
Reply With Quote
  #2   (View Single Post)  
Old 7th April 2011
bmk1st bmk1st is offline
Port Guard
 
Join Date: May 2008
Posts: 25
Thanked 0 Times in 0 Posts
Default

I would think the simple solution is to install X sets. Then python's Tkinter will be installed and you can use pkg_add to install py-Imaging. You don't need to run X server and to have 'machdep.allowaperture=0' in your /etc/sysctl.conf which will prevent X server from running.
Reply With Quote
  #3   (View Single Post)  
Old 7th April 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,686
Thanked 214 Times in 189 Posts
Default

See FAQ 4.11 for guidance on how to install the xbase48.tgz fileset for your missing X11 libraries.
Reply With Quote
  #4   (View Single Post)  
Old 7th April 2011
Barakat Barakat is offline
New User
 
Join Date: Apr 2011
Posts: 3
Thanked 0 Times in 0 Posts
Default

I thout that there would be another way to install it without X "like imagemagick-no-x11". Anyway it's solved by installing X. bmk1st & jggimi thank you guys
Reply With Quote
  #5   (View Single Post)  
Old 7th April 2011
qmemo's Avatar
qmemo qmemo is offline
Shell Scout
 
Join Date: Jul 2008
Location: Egypt
Posts: 133
Thanked 0 Times in 0 Posts
Default

@Barakat

Welcome aboard mate
Reply With Quote
  #6   (View Single Post)  
Old 7th April 2011
Barakat Barakat is offline
New User
 
Join Date: Apr 2011
Posts: 3
Thanked 0 Times in 0 Posts
Default

@qmemo : Hi qmemo : ) , isn't a small world? :{P

@ BSDfan666 : You are right, I've installed all x* sets so that I will not face X problems in future
Reply With Quote
  #7   (View Single Post)  
Old 7th April 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

A lot of software requires libraries that are distributed with X these days, it's unfortunate.. but it's difficult to track and maintain all the inter-dependencies.

The X sets add only a couple hundred megabytes, it's not worth avoiding them.
Reply With Quote
  #8   (View Single Post)  
Old 8th April 2011
qmemo's Avatar
qmemo qmemo is offline
Shell Scout
 
Join Date: Jul 2008
Location: Egypt
Posts: 133
Thanked 0 Times in 0 Posts
Default

@Barakat

sure thing
Reply With Quote
  #9   (View Single Post)  
Old 8th April 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,883
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by Barakat View Post
I believe that because I haven't installed X...
Note that Section 15.4.1 states that building ports without X installed is not supported.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python/GTK/Cairo Problems (ImportError: No module named cairo) whetphish FreeBSD General 2 24th June 2009 11:06 PM
Installing a kernel module afterwards bram85 FreeBSD Installation and Upgrading 1 20th April 2009 11:38 PM
error while installing apache Nk2Network OpenBSD Packages and Ports 4 13th April 2009 08:45 PM
pam_chauthtok(): error in service module KenJackson FreeBSD Installation and Upgrading 1 26th October 2008 11:24 PM
scribes configure error : python + D-bus nORKy FreeBSD Ports and Packages 0 7th October 2008 02:25 PM


All times are GMT. The time now is 09:49 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick