473,413 Members | 1,767 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.

installing BLT module : python beginner

I'm installing BLT module (among others) in my directories - not as a root user. The installation of Tcl and Tk went fine(that means that all of my system variables like PREFIX are set correctly), but when I try to install BLT i get this error message with make:


(cd src; make all)
make[1]: Entering directory `/usr/OpenFOAM/ext/src/tcl/blt2.4z/src'
gcc -c -Wall -m64 -fPIC -I. -I. -I/usr/OpenFOAM/ext/Linux/include bltAlloc.c
In file included from bltInt.h:80,
from bltAlloc.c:1:
bltNsUtil.h:50: error: conflicting types for ‘Tcl_FindCommand’
/usr/OpenFOAM/ext/Linux/include/tclDecls.h:3125: error: previous declaration of ‘Tcl_FindCommand’ was here
bltNsUtil.h:67: error: conflicting types for ‘Tcl_CreateNamespace’
/usr/OpenFOAM/ext/Linux/include/tclDecls.h:3070: error: previous declaration of ‘Tcl_CreateNamespace’ was here
bltNsUtil.h:72: error: conflicting types for ‘Tcl_FindNamespace’
/usr/OpenFOAM/ext/Linux/include/tclDecls.h:3118: error: previous declaration of ‘Tcl_FindNamespace’ was here
bltNsUtil.h:75: error: conflicting types for ‘Tcl_Export’
/usr/OpenFOAM/ext/Linux/include/tclDecls.h:3088: error: previous declaration of ‘Tcl_Export’ was here
make[1]: *** [bltAlloc.o] Error 1
make[1]: Leaving directory `/usr/OpenFOAM/ext/src/tcl/blt2.4z/src'
make: *** [all] Error 2

Please help, I'm eager to start learning Python (i bought 2 books from Amazon :), but I need to get it working. Thank You!
Mar 31 '08 #1
6 5548
woooee
43
What distro are you using? Pretty much all of the package managers have BLT so you don't have to install it yourself. Note that PMW is a dependency for BLT in Python. There aren't any true Python bindings for BLT, there is Pmw.Blt, which is a subset but probably has everything you want to use. Also, run the following code. BLT may already be installed depending on your distro.
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/python
  2.  
  3. import Tkinter
  4. import Pmw
  5. top= Tkinter.Tk()
  6. if not Pmw.Blt.haveblt(top):
  7.      print "BLT is not installed!"
  8. else:
  9.      print "Good BLT install"  
Apr 2 '08 #2
What distro are you using? Pretty much all of the package managers have BLT so you don't have to install it yourself. Note that PMW is a dependency for BLT in Python. There aren't any true Python bindings for BLT, there is Pmw.Blt, which is a subset but probably has everything you want to use. Also, run the following code. BLT may already be installed depending on your distro.
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/python
  2.  
  3. import Tkinter
  4. import Pmw
  5. top= Tkinter.Tk()
  6. if not Pmw.Blt.haveblt(top):
  7.      print "BLT is not installed!"
  8. else:
  9.      print "Good BLT install"  
i'm working on 64-bit open SUSE 10.3

i've tried to install Tcl and Tk in myown set of directories. i've launched python and executed Your code, but there were error messages that Tcl and Pmw were not installed.

is there a way for me to start over? how can I remove python and everything else related from my /usr/bin and other default installation directories? then I can install everything in my local set of directories and test each program as I go.
Apr 4 '08 #3
woooee
43
I haven't compiled Python in years. If I remember correctly, you use --prefix to compile to a different directory. For the tcl/tk,bindings, it's something like --with-tcl directory_name for the Python config file, I think. You'll have to try and find the compile options on the python.org website. Activestate's version has an installer, but I've never used it so don't know if you can specify any options.

Another option would be to just use the existing Python installation and add the TCL/Tk path to PYTHONPATH with a sys.path.append() in the program. Also, a symlink to /usr/lib/ for tcl and tk should work.
Apr 4 '08 #4
thanks. i'll do my best. :)
Apr 4 '08 #5
I use BLT running under Python 2.4.4. To get BLT to run I installed BLT to c:\program files \tcl using blt24z-for-tcl84.exe. I then copied the file pkgIndex.tcl from C:\Program Files\Tcl\lib\blt2.4 into the Tcl8.4 folder at C:\Python24\tcl\tcl8.4
Mar 27 '09 #6
BLT 2.4 has some minor changes in regards to Image handling. for instance you can no longer carry our screen snapshots with the old

img = PhotoImage(name="image", master=master)
g.snap(img) # take snapshot
img.write("file.gif") # and save it to file.

Images now default to ppm's. You need to force GIF output with the following

img = PhotoImage(name="image", master=master)
g.snap(img) # take snapshot
img.write("file.gif" ,format = 'GIF') # and save it to file.
Mar 30 '09 #7

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

Similar topics

5
by: Julia Goolia | last post by:
Hi, I'm sure this issue has been brought up a billion times... but I'm having trouble installing a python module. I have read all the documentation for all the buzz words I know related to this...
0
by: Alex Lapp | last post by:
Hi ng, i have a problem installing cvs module from: http://www.object-craft.com.au/projects/csv/ My Python version is: Python 2.1.3 (Not the latest, but i need this version for running Zope...
2
by: Dennis Hore | last post by:
I'm trying to install Nick Patavalis' ppgplot package on Mac OS X 10.3 with python 2.3. I first sent this message to Nick, but he said he doesn't have any experience with the Mac platform. ...
4
by: Active8 | last post by:
I did this once and can't remember how <blush> so I read the reportlab user guid. It says to unzip the reportlab archive - this is on w2k, BTW, with Python23 - to a directory and make a file...
37
by: jwaixs | last post by:
arg... I've lost 1.5 hours of my precious time to try letting re work correcty. There's really not a single good re tutorial or documentation I could found! There are only reference, and if you...
0
by: Gabriel Genellina | last post by:
En Thu, 10 Jul 2008 14:02:29 -0300, Bhagwat Kolde <bbkolde@gmail.com> escribi�: If it is a single Python module, you can put it anywhere in the Python path. A good place may be the...
0
by: Cyprian Kumwaka | last post by:
I am a beginner in Python. Please tell me how to go about in downloading and installing the module gasp.I am using Python 2.5.2.
0
by: Rob Weir | last post by:
On 13 Aug 2008, Cyprian Kumwaka wrote: What OS are you using? Do you have PyGame installed already? -- -rob
0
by: trihaitran | last post by:
I am reading chapter two of the Pylons book. In the text I am told to run: $ python virtualenv.py --no-site-packages env This is what I got back: $ python virtualenv.py --no-site-packages...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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,...
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...

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.