473,413 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Compilation of _tkinter, tcl/tk bindings

mg
Hello,

First, I installed Python on a traditionnal default linux-x86 platform
(tk.h is located in /usr/include) and I did not meet any problem. I can
write the following instruction without error in my python interpreter:

../configure --prefix=/usr/local/python
make
make install
/usr/local/python/bin/python
import Tkinter

Second, I tried to install python on IBM-Aix5.1 with tk bindings too.
Because of tcl/tk doesn't exist on my default platform, I have installed
tcl8.4.11 in /usr/local/tcl8.4.11. Now, I ran the compilation of Python
and tried to import Tkinter :

../configure --prefix=/usr/local/python
make
make install
/usr/local/python/bin/python import Tkinter Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/python/lib/python2.5/lib-tk/Tkinter.py", line 38, in ?
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter


In fact, when Python is compiled, the shared library _tkinter.so should
be compiled (Tkinter.py is just a Python script which import
_tkinter.so) if tk is detected on the platform.

So, my questions are :
- Must I install tcl/tk in the default directories give by the
distribution to compile python and Tkinter (_tkinter) ?
- or can I specify the tcl/tk installation to compile Python and Tkinter
(_tkinter) ?

Regards,
Mathieu.

Oct 14 '05 #1
0 1684

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

Similar topics

2
by: Sebastian Stelzer | last post by:
Hi, I'am a beginner in Python and I have got a problem with the TKInter module. When I want to start e.g. pysol, I get following output: Traceback (most recent call last): File...
2
by: gaool | last post by:
Hello, I try to launch a Python script on SunOS system but I have this error: """Traceback (most recent call last): File "ihm1_1.py", line 3, in ? from Tkinter import * File...
1
by: Arthur Chereau | last post by:
Hi, I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with Python 2.4.1. The last viewcvs (from CVS) needs subversion python bindings. I installed swig and built subversion from...
1
by: Sorin Schwimmer | last post by:
Hi All, After a disaster in which I lost my whole harddrive, I decided to install the newest everything that I use. I put the latest Gentoo Linux, with gcc 4.1.1, installed tcl/tk 8.4.14 and...
1
by: Sue Velutty | last post by:
Hi, I'm having this errror when I try to run "import _tkinter" in python Python 2.2.2 (#1, Apr 5 2007, 12:58:53) on linux2 Type "help", "copyright", "credits" or "license" for more...
1
by: Jason Yamada-Hanff | last post by:
Hi all, I'm working on a project that would benefit very much from Python Freetype2 bindings (the Fonty Python project). I don't want to duplicate efforts and wrap the library again if we don't...
9
by: wyleu | last post by:
I'm running on Mandriva 2007 (2.6.17-5mdv) and thus have python2.4.3 installed by default, I'm running code requiring yield(), so need python2.5 and have installed this sucessfully, and linked...
5
by: jgelfand | last post by:
I'm installing Python 2.4.4 on a CentOS release 4.6 (Final) 64-bit machine. Running "./configure --prefix="/ usr/local/yosi/ciao-4.0/ots" --enable-shared" appears to be fine, but I get the...
0
by: akineko | last post by:
Hello, I spent time today to investigate this. If you install Python with Tkinter from source, _tkinter is built into the Python executable and _tkinter.so is not generated *unless* "shared"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.