Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

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 
share|improve this answer
    
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 '10 at 1:57
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.