473,837 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

import gtk : gives error message

varuns
39 New Member
i have installed following packages in same order as shown

1) python2.5
2) Glib 2.12.12
3) atk-1.9.1
4) cairo 1.4.6
5) pango 1.16.4
6) gtk+-2.10.0
7) pycairo 1.4.0
8) pygobject 2.13.1
9) pygtk-2.8.6

installation succeeds but while importing gtk following error is displayed

Expand|Select|Wrap|Line Numbers
  1. Python 2.5 (r25:51908, Jun  4 2007, 14:10:43)
  2. [GCC 4.1.1] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import gtk
  5. Traceback (most recent call last):
  6.   File "<stdin>", line 1, in <module>
  7.   File "/usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 45, in <module>
  8.     from _gtk import *
  9. ImportError: /usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/_gtk.so: undefined symbol: gdk_keyval_convert_case
please help me to solve this problem..

my OS is Ubuntu Linux the edgy 6.10

thanks in advance for your help
Jun 5 '07
13 6067
varuns
39 New Member
ImportError: /usr/gtkdfb/src/pygtk-2.10.0/gtk/.libs/_gtk.so: undefined symbol: gdk_keyval_conv ert_case
can you post what r the steps you have taken to install pygtk.
Sep 7 '07 #11
johnwood1967
3 New Member
Ok, here is my setup...
I followed the example of getting GTK on Directfb from source:

http://www.directfb.or g/wiki/index.php/Projects:GTK_on _DirectFB

I installed pango-1.15.3, Python-2.4.4, pygobject-2.13.0,
cairo-1.4.6, gtk+-2.10.13 and pygtk-2.10.0

I set up environment variables
export PREFIX=/usr/gtkdfb
export LD_LIBRARY_PATH =$PREFIX/lib
export PKG_CONFIG_PATH =$LD_LIBRARY_PA TH/pkgconfig
export CFLAGS="-g"

then untarred, configure, make, make install with
the options as follows.

For cairo
configure --prefix=$PREFIX --enable-directfb --disable-xlib --disable-win32

For gtk
configure --prefix=$PREFIX --with-gdktarget=direc tfb --without-x

for others, used no extra options

After installing, when I run
/usr/gtkdfb/bin/gtk-demo
works correctly; I get gtk demo within a directfb framebuffer and no
X frills.

I applied the fixes to the source files, then re-installed
gtk and pygtk.
Still getting the error

ImportError: /usr/local/lib/python2.5/site-packages/gtk-2.0/gtk/_gtk.so: undefined symbol: gdk_keyval_conv ert_case

I tried adding the dummy function as recommended by earlier post
to make it non-blank but C compiler complained that it was already
defined etc.

Thanks for any help.
pygtk+directfb would be a great combination to help embedded
system development.

John






can you post what r the steps you have taken to install pygtk.
Sep 7 '07 #12
varuns
39 New Member
[quote=
for others, used no extra options

[/QUOTE]

every thing seems to be correct

have you installed pygobject and pygtk as given below, if so it should work.

1. cd pygobject && ./configure --prefix=$PREFIX PYTHON=pythonx. x && make && make install
(x.x is version of python currently installed)
2. cd pygtk && ./configure --prefix=$PREFIX PYTHON=pythonx. x && make && make install
Sep 7 '07 #13
johnwood1967
3 New Member
Ok, thanks I got it to work with the changes
you suggested.
I had some leftover symlinks to the fedora
GTK system and libraries.

pygtk on directfb is a very useful package
for embedded - way smaller than java + X
Calculate it <10 Mbytes for the whole
working system as replacement for X and Java.
Sep 11 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2731
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24 to obtain SHIP_wrap.cpp and SHIP.py; the latter contains the line "import _SHIP". I compile SHIP_wrap.cpp and a bunch of files into a DLL which I have the
3
2618
by: krzychu | last post by:
Hi, I have installed brand new platform - Zope-2-7-6, Python 2.4.1, Plone 2.0.5, OS Debian 1:3.3.6-2. After import a old Plone site from the following platform Zope-2-7-4, Python 2.3.3, Plone 2.0.3 to the new one, I get error when I visit PuthonScript in the ZMI. "invalid syntax (Script (Python), line 1)"
1
6708
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my database stats: Path: C:\Database (contains the database and all the text files to be imported) Text files to import: (SampleData4.txt and SampleData3.txt as testing examples)
4
3031
by: Steve Jorgensen | last post by:
I'm restarting this thread with a different focus. The project I'm working on now id coming along and will be made to work, and it's too late to start over with a new strategy. Still, I'm not coming to a firm conclusion over whether it was the better approach, and wonder if I should do it differently the next time I'm faced with a similar issue. I needed an app to automatically import from spreadsheets with a semi-dynamic structure,...
0
1280
by: J. Koskey | last post by:
We're having a problem with the File-Get External Data-Import function on a PC with Access 2000 - it just doesn't work, but gives no error message. When we try to use the File-Get External Data-Import function, Access allows us to select an Excel file and highlight it for importing, but then at that point Access just quits doing that function. No error message and it doesn't make Access crash or anything - it just returns to the...
1
2422
by: Srini | last post by:
Hi, I am trying to import an xml file which has more than 255 fields. Access is unable to import the xml file into tables and gives the error message "Too many fields defined." in ImportErrors column. I was wondering is there any solution to fix the problem. Please reply.
4
4031
by: Mathias Waack | last post by:
Hi, I've embedded python into a legacy application. It works - most of the time. In some special situations the app crashes executing the "import random". There are two different situations: 1. the sources compiled with gcc 4.1.2 crash with illegal instruction error: (running my application)
2
1748
by: mattc66 via AccessMonster.com | last post by:
We import data from ASC files. At times the data contains " quotes in the descrition resulting in Import Errors. What I would like to do is create some sort of query that would show the data in question. The Import error gives me the line# referance. I would like to display this line back to the user doing the import. Does anyone have any examples of how I may be able to handle this issue? Thanks
0
2093
by: Michael Boldin via alt email | last post by:
I installed python 2.5 and used the win package for installing MySQLdb. (Iam running Windows XP) Everything works as expected using python directly (Windows command shell) but using IDLE gives the import error below. Same error with PythonWin as my IDE and everything works using python 2.4-- with IDLE and without, mySQLdb is loaded with out error. Below is the IDLEscreen capture Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) on win32...
2
12433
by: HMS Surprise | last post by:
Greetings. What is the implication of the error message 'cannot import name .....'? It occurs when executing the line: from nBaseTest import nBaseTest The file exists and the class within it exists. Changing it to from nBaseTest import x
0
9837
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
9682
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,...
0
10870
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10621
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
10267
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
9392
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
2
4038
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3123
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.