Re: [Fink-users] gtk importerror

2008-05-22 Thread thetrystero

It's now having trouble locating pango. 
In the spirit of the suggestions regarding gtk here, I added all the paths
related to pango that I could find to PYTHONPATH:
/sw/lib/pango:/sw/etc/:/sw/lib/pango/1.4.0/modules:/sw/etc/pango:/include/pango-1.0/pango:/lib/pkgconfig

but to no avail.

  File
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/kananoquiz/gtk_gui.py,
line 27, in ?
from pango import FontDescription
ImportError: No module named pango

What am I missing?

As a long term solution, is it possible to build a feature in to fink that
automatically sets all relevant PATH variables? (Not just for python type
packages but in general) 



Martin Costabel wrote:
 
 thetrystero wrote:
 I set-up my PYTHONPATH as follows:
 
 [Admins-Computer 18]   echo $PYTHONPATH
 /sw/bin:/sw/lib/python2.3/site-packages:/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages
 
 Now it proceeds one line further in the syntax error output:
   File /sw/lib/python2.3/site-packages/gtk.py, line 20, in ?
 from GTK import *
 ImportError: No module named GTK
 
 So it *looks* like it's using /sw/bin/python2.3 now.
 Are gtk and GTK two different things -- is that probably why I'm getting
 this error?
 
 I looked at that package pygtk-py23. Strangely, it installs some stuff, 
 for example GTK.py, into the directory /sw/lib/site-python/.
 
 You could try to add /sw/lib/site-python to your PYTHONPATH.
 
 -- 
 Martin
 
 -
 This SF.net email is sponsored by: Microsoft 
 Defy all challenges. Microsoft(R) Visual Studio 2008. 
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Fink-users mailing list
 Fink-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fink-users
 
 

-- 
View this message in context: 
http://www.nabble.com/gtk-%22importerror%22-tp17263512p17357676.html
Sent from the fink-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-22 Thread Martin Costabel
thetrystero wrote:
 It's now having trouble locating pango. 

My guess is that the reason for this is that you don't have a python 
module named pango. It therefore cannot find it. Or do you have one?

 In the spirit of the suggestions regarding gtk here, I added all the paths
 related to pango that I could find to PYTHONPATH:
 /sw/lib/pango:/sw/etc/:/sw/lib/pango/1.4.0/modules:/sw/etc/pango:/include/pango-1.0/pango:/lib/pkgconfig
 
 but to no avail.

Well, this only makes sense if there is a pango python module. i.e. at 
least a file named pango.py somewhere in one of these directories. Is 
there?
[]

 As a long term solution, is it possible to build a feature in to fink that
 automatically sets all relevant PATH variables? (Not just for python type
 packages but in general) 

No. Those environment variables that are needed are already set (the 
missing /sw/lib/site-python for pygtk is a bug in the latter package), 
and setting all relevant variables, including those needed for 
building things outside of Fink as you are trying to do, is clearly 
impossible. Only you can know what is present on your system and 
configure it accordingly.

-- 
Martin




-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-22 Thread thetrystero

I found a pango.pc and a pango.modules, amongst other things, but no pango.py

Strange, the website only specified gtk+ and pygtk as a requirement. pango
was installed by fink as a gtk dependency.

Perhaps I need one of these other packages?

[Admins-Computer 11] pango  fink list pango
Information about 2954 packages read in 11 seconds.
 pango1 1.2.1-25   I18N text handling system convinience
package
 pango1-dev 1.2.1-25   I18N text handling system convinience
package
 pango1-shlibs  1.2.1-25   I18N text handling system convinience
package
 i   pango1-xft21.10.1-1003GTK+ - i18n libs (for XFree86 = 4.3)
 i   pango1-xft2-dev1.10.1-1003GTK+ - i18n text development headers
and librarie...
 pango1-xft2-ft219  1.10.1-1103GTK+ - i18n libs (for freetype =
2.1.9)
 pango1-xft2-ft...  1.10.1-1103GTK+ - i18n text development headers
and librarie...
 pango1-xft2-ft...  1.10.1-1103GTK+ - i18n text shared libraries
(for freetype ...
 i   pango1-xft2-sh...  1.10.1-1003GTK+ - i18n text shared libraries
(for XFree86 =


Martin Costabel wrote:
 
 thetrystero wrote:
 It's now having trouble locating pango. 
 
 My guess is that the reason for this is that you don't have a python 
 module named pango. It therefore cannot find it. Or do you have one?
 
 In the spirit of the suggestions regarding gtk here, I added all the
 paths
 related to pango that I could find to PYTHONPATH:
 /sw/lib/pango:/sw/etc/:/sw/lib/pango/1.4.0/modules:/sw/etc/pango:/include/pango-1.0/pango:/lib/pkgconfig
 
 but to no avail.
 
 Well, this only makes sense if there is a pango python module. i.e. at 
 least a file named pango.py somewhere in one of these directories. Is 
 there?
 []
 
 As a long term solution, is it possible to build a feature in to fink
 that
 automatically sets all relevant PATH variables? (Not just for python type
 packages but in general) 
 
 No. Those environment variables that are needed are already set (the 
 missing /sw/lib/site-python for pygtk is a bug in the latter package), 
 and setting all relevant variables, including those needed for 
 building things outside of Fink as you are trying to do, is clearly 
 impossible. Only you can know what is present on your system and 
 configure it accordingly.
 
 -- 
 Martin
 
 
 
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Fink-users mailing list
 Fink-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/fink-users
 
 

-- 
View this message in context: 
http://www.nabble.com/gtk-%22importerror%22-tp17263512p17403981.html
Sent from the fink-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-22 Thread Martin Costabel
thetrystero wrote:
 I found a pango.pc and a pango.modules, amongst other things, but no pango.py
 
 Strange, the website only specified gtk+ and pygtk as a requirement. pango
 was installed by fink as a gtk dependency.

As was suggested before, the Fink pygtk-py23 package is perhaps not what 
you want to install for satisfying that requirement. It is for older 
versions of gtk.

There is pygtk2-py23 and pygtk2-gtk-py23, and as far as I can guess (I 
don't have the py23 versions installed, only py24 or py25), 
pygtk2-gtk-py23 contains a pango module, in the form of 
/sw/lib/python2.3/site-packages/gtk-2.0/pango.so.

-- 
Martin

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-20 Thread thetrystero

I set-up my PYTHONPATH as follows:

[Admins-Computer 18]   echo $PYTHONPATH
/sw/bin:/sw/lib/python2.3/site-packages:/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages

Now it proceeds one line further in the syntax error output:
  File /sw/lib/python2.3/site-packages/gtk.py, line 20, in ?
from GTK import *
ImportError: No module named GTK

So it *looks* like it's using /sw/bin/python2.3 now.
Are gtk and GTK two different things -- is that probably why I'm getting
this error?

My OS version is 10.4.11




Daniel Macks wrote:

Use /sw/bin/python2.3 or something
 similar) instead of apple's /usr/bin/python*.

You can also use the environment variable PYTHONPATH to point python to 
multiple or non-standard installation directories. You would need to do 
this if you installed some python stuff in 
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages
(AKA /Library/Python/2.3/site-packages) and others in 
/sw/lib/python2.3/site-packages.

-Martin

-- 
View this message in context: 
http://www.nabble.com/gtk-%22importerror%22-tp17263512p17333051.html
Sent from the fink-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-20 Thread Martin Costabel
thetrystero wrote:
 I set-up my PYTHONPATH as follows:
 
 [Admins-Computer 18]   echo $PYTHONPATH
 /sw/bin:/sw/lib/python2.3/site-packages:/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages
 
 Now it proceeds one line further in the syntax error output:
   File /sw/lib/python2.3/site-packages/gtk.py, line 20, in ?
 from GTK import *
 ImportError: No module named GTK
 
 So it *looks* like it's using /sw/bin/python2.3 now.
 Are gtk and GTK two different things -- is that probably why I'm getting
 this error?

I looked at that package pygtk-py23. Strangely, it installs some stuff, 
for example GTK.py, into the directory /sw/lib/site-python/.

You could try to add /sw/lib/site-python to your PYTHONPATH.

-- 
Martin

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-20 Thread Stephen Langer

On May 20, 2008, at 11:30 AM, Martin Costabel wrote:

 thetrystero wrote:
 I set-up my PYTHONPATH as follows:

 [Admins-Computer 18]   echo $PYTHONPATH
 /sw/bin:/sw/lib/python2.3/site-packages:/System/Library/Frameworks/ 
 Python.framework/Versions/2.3/lib/python2.3/site-packages

 Now it proceeds one line further in the syntax error output:
   File /sw/lib/python2.3/site-packages/gtk.py, line 20, in ?
 from GTK import *
 ImportError: No module named GTK

 So it *looks* like it's using /sw/bin/python2.3 now.
 Are gtk and GTK two different things -- is that probably why I'm  
 getting
 this error?

 I looked at that package pygtk-py23. Strangely, it installs some  
 stuff,
 for example GTK.py, into the directory /sw/lib/site-python/.

 You could try to add /sw/lib/site-python to your PYTHONPATH.

pygtk-py23 is part of the old pygtk 1.  If I remember correctly, in  
pygtk 1 there were files called gtk.py *and* GTK.py.  They couldn't  
be in the same directory on Apple's case insensitive file system, so  
GTK.py was put in a strange spot.

You probably don't want to install pygtk-py23 at all.  Stick with  
pygtk2-gtk-py23, which is more up to date and doesn't have this problem.

  -- Steve

--
-- EMail: [EMAIL PROTECTED]Phone: (301)  
975-5423 --
-- WWW:  http://math.nist.gov/mcsd/Staff/SLanger/Fax:   (301)  
975-3553 --
-- Mail: NIST; 100 Bureau Drive -- Stop 8910; Gaithersburg, Md   
20899-8910 --

-- I don't think this will work.  That's why it's  
science.   --
--  Naomi Langer (age 6),  17 Feb  
2003 --



-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-19 Thread Alexander K Hansen
On Thursday 15 May 2008 18:00:49 thetrystero wrote:
 Hello,

 I'm trying to get the program kana-no-quiz to work on OS X but after
 installing the necessary items, I'm getting the following error:

 [Admins-Computer 26] Kana no quiz-1.9 
 /System/Library/Frameworks/Python.framework/Versions/2.3/bin/kana-no-quiz
 Traceback (most recent call last):
   File
 /System/Library/Frameworks/Python.framework/Versions/2.3/bin/kana-no-quiz
, line 24, in ?
 from kananoquiz import *
   File
 /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/sit
e-packages/kananoquiz/__init__.py, line 36, in ?
 import gtk_gui as gui
   File
 /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/sit
e-packages/kananoquiz/gtk_gui.py, line 23, in ?
 import gtk
 ImportError: No module named gtk

 The website (http://choplair.org/?Kana%20no%20quiz%27s%20Readme) says to
 install gtk and pygtk which I did using fink, so I'm not sure what else has
 gone wrong.

 [Admins-Computer 25] Kana no quiz-1.9  fink list gtk+
 Information about 2954 packages read in 10 seconds.
  i   gtk+  1.2.10-51 The Gimp Toolkit
  i   gtk+-data 1.2.10-51 The Gimp Toolkit
  i   gtk+-shlibs   1.2.10-51 The Gimp Toolkit
  i   gtk+2 2.6.10-1003   The Gimp Toolkit
  gtk+2-dev 2.6.10-1003   The Gimp Toolkit
  i   gtk+2-shlibs  2.6.10-1003   The Gimp Toolkit
 [05:47 1.741.331.12]

 [Admins-Computer 27] Kana no quiz-1.9  fink list pygtk
 Information about 2954 packages read in 6 seconds.
  i   pygtk 0.6.9-13  Placeholder for versioned pygtk
 packages
  i   pygtk-py230.6.9-1016Modules for use of GTK with Python

 Any suggestions/help would be much appreciated!

It might be helpful to know what OS version you're on.   

It's not obvious from the website, but the package may want gtk+2, and the 
corresponding python bindings (pygtk-gtk2-pyXY).




-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-19 Thread Daniel Macks
On Mon, May 19, 2008 at 02:25:26PM -0400, Alexander K Hansen wrote:
 On Thursday 15 May 2008 18:00:49 thetrystero wrote:
  Hello,
 
  I'm trying to get the program kana-no-quiz to work on OS X but after
  installing the necessary items, I'm getting the following error:
 
  [Admins-Computer 26] Kana no quiz-1.9 
  /System/Library/Frameworks/Python.framework/Versions/2.3/bin/kana-no-quiz
  Traceback (most recent call last):
File
  /System/Library/Frameworks/Python.framework/Versions/2.3/bin/kana-no-quiz
 , line 24, in ?
  from kananoquiz import *
File
  /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/sit
 e-packages/kananoquiz/__init__.py, line 36, in ?
  import gtk_gui as gui
File
  /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/sit
 e-packages/kananoquiz/gtk_gui.py, line 23, in ?
  import gtk
  ImportError: No module named gtk
 
  The website (http://choplair.org/?Kana%20no%20quiz%27s%20Readme) says to
  install gtk and pygtk which I did using fink, so I'm not sure what else has
  gone wrong.
 
  [Admins-Computer 25] Kana no quiz-1.9  fink list gtk+
  Information about 2954 packages read in 10 seconds.
   i   gtk+  1.2.10-51 The Gimp Toolkit
   i   gtk+-data 1.2.10-51 The Gimp Toolkit
   i   gtk+-shlibs   1.2.10-51 The Gimp Toolkit
   i   gtk+2 2.6.10-1003   The Gimp Toolkit
   gtk+2-dev 2.6.10-1003   The Gimp Toolkit
   i   gtk+2-shlibs  2.6.10-1003   The Gimp Toolkit
  [05:47 1.741.331.12]
 
  [Admins-Computer 27] Kana no quiz-1.9  fink list pygtk
  Information about 2954 packages read in 6 seconds.
   i   pygtk 0.6.9-13  Placeholder for versioned pygtk
  packages
   i   pygtk-py230.6.9-1016Modules for use of GTK with Python
 
  Any suggestions/help would be much appreciated!
 
 It might be helpful to know what OS version you're on.   
 
 It's not obvious from the website, but the package may want gtk+2, and the 
 corresponding python bindings (pygtk-gtk2-pyXY).

Also, fink's python modules (as with everything in fink) are not
installed in a place that is normally used by Apple things. Therefore,
it's not surprising that apple's python (which is what your python
program is using) is not seeing the pygtk installed by fink. Fink's
pygtk* modules are specially tuned for use by *fink's* python and
installed in a place that fink's python will find them (fink is
self-consistent in its own world). Use /sw/bin/python2.3 or something
similar) instead of apple's /usr/bin/python*.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users


Re: [Fink-users] gtk importerror

2008-05-19 Thread Martin Costabel
Daniel Macks wrote:
[]
 Also, fink's python modules (as with everything in fink) are not
 installed in a place that is normally used by Apple things. Therefore,
 it's not surprising that apple's python (which is what your python
 program is using) is not seeing the pygtk installed by fink. Fink's
 pygtk* modules are specially tuned for use by *fink's* python and
 installed in a place that fink's python will find them (fink is
 self-consistent in its own world). Use /sw/bin/python2.3 or something
 similar) instead of apple's /usr/bin/python*.

You can also use the environment variable PYTHONPATH to point python to 
multiple or non-standard installation directories. You would need to do 
this if you installed some python stuff in 
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages
(AKA /Library/Python/2.3/site-packages) and others in 
/sw/lib/python2.3/site-packages.

-- 
Martin


-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users