installation in mac os x

K

Karl Jansson

Hi,

I was doing the tutorial at http://www.python.org/doc/current/
tutorial/, and I came across some code that did not work, and I got
the following error: AttributeError: 'str' object has no attribute
'format'.

So I downloaded a .dmg of python 2.6.2 and then I installed it. But
it's not working. Running the Python launcher, the "new" command in
the file menu is grey, and won't work, so I can't make any scripts.

Does anyone know how to make python 2.6.2 work in mac os x?

Thanks,
Stefan
 
D

Diez B. Roggisch

Karl said:
Hi,

I was doing the tutorial at http://www.python.org/doc/current/
tutorial/, and I came across some code that did not work, and I got
the following error: AttributeError: 'str' object has no attribute
'format'.

So I downloaded a .dmg of python 2.6.2 and then I installed it. But
it's not working. Running the Python launcher, the "new" command in
the file menu is grey, and won't work, so I can't make any scripts.

Does anyone know how to make python 2.6.2 work in mac os x?

What happens if you work on the commandline (Terminal)?

Python2.6 should be available from (out of my head)

/Library/Frameworks/Python.framework/Versions/2.6/bin/python

If that's working, it is successfully installed.

Diez
 
P

Philip Semanchuk

If I work on the commandline, I have version 2.3, which works. But
some of the commands in the tutorial don't work with that version,
so I had to upgrade in order to do the tutorial. But I still can't
do it, obviously.

The system Python (2.3) is in /usr/bin and that's probably first in
your path, so when you simply type 'python' it finds /usr/bin/python.

Python 2.6 might have installed itself in /usr/local/bin. Try
invoking /usr/local/bin/python and see which one you get (if that
works at all). If that's Python 2.6, then move /usr/local/bin ahead of
usr/bin in your path and then you'll invoke Python 2.6 by just typing
'python' at the command line.

If that doesn't work, hunt around in /Library/Frameworks as Diez
suggested. Until we figure out whether or not you actually have 2.6
installed, it is difficult to suggest how to invoke it.

Let us know what you find.

bye
Philip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top