473,695 Members | 3,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Non-programmer needs help with PyGTK-2.0.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a program written in python that tells me it requires PyGTK, so I
DLed, ./configure, make, make install and the process seems to go ok. Some
errors but the process finishes so I assumed they weren't fatal errors.

So now I attempt to run my python program and I get;
$ gccp.py
Traceback (most recent call last):
File "./gccp.py", line 9, in ?
import pygtk
ImportError: No module named pygtk

I'm running Slackware 9.1 with a 2.6.6 kernel, and I don't know what other
information would be helpful.

Mark

- --
Remove both wrongs to make the email address right.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAtq9mLVm EOl6/PWERAhQlAJ9tftg 6Bul2uBsi+4kxUb OQpXKuyACfV9WG
zC11tY3NhVmBqye 0QPiYwoY=
=G1KG
-----END PGP SIGNATURE-----
Jul 18 '05 #1
6 2037


Mark Mitchell wrote:
I have a program written in python that tells me it requires PyGTK, so I
DLed, ./configure, make, make install and the process seems to go ok. Some
errors but the process finishes so I assumed they weren't fatal errors.
It often complains about missing functions, or something.
It compiles though, so I assume, it's built completely.

So now I attempt to run my python program and I get;
$ gccp.py
Traceback (most recent call last):
File "./gccp.py", line 9, in ?
import pygtk
ImportError: No module named pygtk

I'm running Slackware 9.1 with a 2.6.6 kernel, and I don't know what other
information would be helpful.


Most probably, pygtk is installed in a directory where python
cannot find it (i.e. the wrong directory). So setting PYTHONPATH
may help. If not:

Did you get python from a Slackware package?

Where's the python standard library?
in /usr/lib/python?.? or /usr/local/lib/python?.? ?

Where did it install pygtk?
/usr/lib/python?.?/site-packages or /usr/local/lib/python?.?/site-packages ?

What's your --prefix for ./configure ?

Greetings,

Holger

Jul 18 '05 #2
P
Mark Mitchell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a program written in python that tells me it requires PyGTK, so I
DLed, ./configure, make, make install and the process seems to go ok. Some
errors but the process finishes so I assumed they weren't fatal errors.

So now I attempt to run my python program and I get;
$ gccp.py
Traceback (most recent call last):
File "./gccp.py", line 9, in ?
import pygtk
ImportError: No module named pygtk

I'm running Slackware 9.1 with a 2.6.6 kernel, and I don't know what other
information would be helpful.


Why not try a prepackaged version?
http://www.linuxpackages.net/search_...pygtk2&ver=9.1
At least it will give you info on the right thing to do

Pádraig.
Jul 18 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-05-28, Holger Türk <ht**@gmx.de> wrote:


Mark Mitchell wrote:
I have a program written in python that tells me it requires PyGTK, so I
DLed, ./configure, make, make install and the process seems to go ok. Some
errors but the process finishes so I assumed they weren't fatal errors.
It often complains about missing functions, or something.
It compiles though, so I assume, it's built completely.

So now I attempt to run my python program and I get;
$ gccp.py
Traceback (most recent call last):
File "./gccp.py", line 9, in ?
import pygtk
ImportError: No module named pygtk

I'm running Slackware 9.1 with a 2.6.6 kernel, and I don't know what other
information would be helpful.


Most probably, pygtk is installed in a directory where python
cannot find it (i.e. the wrong directory). So setting PYTHONPATH
may help. If not:

Did you get python from a Slackware package?

No, I compiled from source.
Where's the python standard library?
in /usr/lib/python?.? or /usr/local/lib/python?.? ?
I have a /usr/lib/python2.3 that has a bunch of .py .pyo .pyc files, and
I also have a;
$ ls -l /usr/local/lib/python2.3/
total 1
drwxr-xr-x 3 root root 192 2004-05-26 23:56 site-packages/
Where did it install pygtk?
/usr/lib/python?.?/site-packages or /usr/local/lib/python?.?/site-packages ?
I'm not sure what exactly you're referring to here. Looking at my install
log, I have a number of .py .pyc .pyo files in
usr/local/lib/python2.3/site-packages/gtk-2.0/gtk/ and
usr/local/share/pygtk/2.0/

Is there a single filename or extension I should be looking for?
What's your --prefix for ./configure ?

I didn't use one, just straight ./configure.

Mark

- --
Remove both wrongs to make the email address right.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAt2fPLVm EOl6/PWERAkW2AKCw+gK/pTYQ7JdDTbh4jrO 7TvPXiwCfVGBK
Hip5c0CaZ/T9NAuyvZfkfg4=
=8hIu
-----END PGP SIGNATURE-----
Jul 18 '05 #4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-05-28, P@draigBrady.co m <P@draigBrady.c om> wrote:
Mark Mitchell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a program written in python that tells me it requires PyGTK, so I
DLed, ./configure, make, make install and the process seems to go ok. Some
errors but the process finishes so I assumed they weren't fatal errors.

So now I attempt to run my python program and I get;
$ gccp.py
Traceback (most recent call last):
File "./gccp.py", line 9, in ?
import pygtk
ImportError: No module named pygtk

I'm running Slackware 9.1 with a 2.6.6 kernel, and I don't know what other
information would be helpful.


Why not try a prepackaged version?
http://www.linuxpackages.net/search_...pygtk2&ver=9.1
At least it will give you info on the right thing to do

Two reasons, 1, I didn't know there was one. I may go that route in the
end. 2, I'd like to learn what I did wrong so that I have a better chance
of having it go flawlessly next time I have to install something like this.

Thanks for the link, though. It's bookmarked.

Mark

- --
Remove both wrongs to make the email address right.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAt2h3LVm EOl6/PWERAjjnAJ9wEZb FbXb6oHb8mmIrzs vgajSs7gCfQod+
Z5PwWZj3RIcUoOm e5xcV9vU=
=fZsW
-----END PGP SIGNATURE-----
Jul 18 '05 #5
>>>>> "Mark" == Mark Mitchell <ma***********@ wrongbellsouth. net> writes:

Mark> No, I compiled from source.

Try installing with 'python setup.py install' rather than
configure/make install.

Jul 18 '05 #6


Mark Mitchell wrote:
Where's the python standard library?
in /usr/lib/python?.? or /usr/local/lib/python?.? ?
I have a /usr/lib/python2.3 that has a bunch of .py .pyo .pyc files, and


Python got installed with prefix /usr
I also have a;
$ ls -l /usr/local/lib/python2.3/
total 1
drwxr-xr-x 3 root root 192 2004-05-26 23:56 site-packages/
Where did it install pygtk?
/usr/lib/python?.?/site-packages or /usr/local/lib/python?.?/site-packages ?


I'm not sure what exactly you're referring to here. Looking at my install
log, I have a number of .py .pyc .pyo files in
usr/local/lib/python2.3/site-packages/gtk-2.0/gtk/ and
usr/local/share/pygtk/2.0/


pygtk got installed with prefix /usr/local
_Your_ Python installation doesn't look there by default.
What's your --prefix for ./configure ?


I didn't use one, just straight ./configure.


Which means /usr/local.

Try setting PYTHONPATH to
/usr/local/lib/python2.3:\
/usr/local/lib/python2.3/site-packages:\
/usr/local/lib/python2.3/site-packages/gtk-2.0

If that doesn't work, do

../configure --prefix=/usr

instead of

../configure

as Sridhar R already pointed out.

Greetings,

Holger

Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2586
by: Mark Stijnman | last post by:
I would like to be able to have an object accessible as a vector using the operator, but able to track modifications to its data, so that it can update other internal data as needed. I figured that setting a flag in the non-const operator would work, but it doesn't. Take the code below: #include <iostream> using std::cout; using std::cerr;
1
6900
by: Markus Ernst | last post by:
Hi I wrote a function that "normalizes" strings for use in URLs in a UTF-8 encoded content administration application. After having removed the accents from latin characters I try to remove all non-word characters from the string: // PCRE syntax: $string = preg_replace("/(+)/", "-", $string);
25
7622
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
4
5305
by: bwmiller16 | last post by:
Guys - I'm doing a database consistency check for a client and I find that they're building unique indexes for performance/query reasons where they could be using non-unique indexes. Note that these columns in the unique indexes are truly unique and don't constitute a collision hazard of any kind. Now, I personally wouldn't use unique where non-unique would do but I
13
2939
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the events.. But the regular forms that are also open do not receive that event. This is true whether there are child forms open or not.
399
12814
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or to python-3000@python.org In summary, this PEP proposes to allow non-ASCII letters as identifiers in Python. If the PEP is accepted, the following identifiers would also become valid as class, function, or variable names: Löffelstiel,...
4
1941
by: archimed7592 | last post by:
Hi. for example i have base class A and dirved class B: struct A { virtual void f() { std::cout << "A::f()" << std::endl; } }; struct B : public A {
6
6474
by: Fabian Wein | last post by:
Hi, is there a way to call a const function from non const function? I have a non-const List GetList(); and want my
13
18943
by: asm23 | last post by:
Hi,I need some help to clarify the warning "initial value of reference to non-const must be an lvalue". I'm searching in this groups to find someone has the same situation like me. I found in the Post: http://groups.google.com/group/comp.lang.c++/browse_thread/thread/e81cd9d9c2200d74/48c0774eeb3bd998?hl=en&lnk=gst&q=initial+value+of+reference+to+non-const#48c0774eeb3bd998 ...
12
29879
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
0
8640
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8860
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4587
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3018
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2281
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.