0

Well today's been a bit of shock. After running port -v selfupdate followed by an attempt to run sudo port install py26-ipython MacPorts went around installing a whole host of stuff, including updating my Python from 2.6.4 to 2.6.5. It's nice but unexpected in a creepy way.

So I tried to install TKInter using MacPorts with port search tkinter yielding:

py-tkinter @2.4.6 (python, graphics)
    Python bindings to the Tk widget set

py25-tkinter @2.5.4 (python, graphics)
    This is a stub. tkinter is now built with python25

Found 2 ports.  

So I tried sudo port install py25-tkinter and then it tries to install Python 2.5.5. There must be an easier way to install TkInter without being faffed around... help please?

2 Answers 2

0

C extensions for python will require different shared libraries for each major version e.g. 2.x

Macports thus creates a separate set of ports for each version of python. Macports will also update its python to the latest minor version - thus in your case the upgrade from 2.5.4 to 2.5.5

To use macports python you need to choose which major version currently 2.4, 2.5, 2.6, 3.0 or 3.1 (2.7 might be there but few libraries) Then choose the libraries you need which are prefixed respecively with py-, py25-, py26-, py30- and py31-

As for TKinter it is from 2.6 onwards it is part of the base python port so you do not need to install it.

You need to choose your python version - I would suggest 2.6. This is done by installing the port python select and then running ot to choose the version e.g.

 python_select python26 
1
  • Thanks muchly. I can't believe I wasted so much time trying to get Tkinter without realising it was just an import Tkinter away ;)
    – PizzAzzra
    Jun 4, 2010 at 1:57
0

If you don't want MacPorts to update your existing outdated software before installing a new port, use the -n switch.

sudo port -n install py26-ipython

Usually it's better to upgrade first and then install new ports as it is less error-prone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .