Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

After giving up on doing a disk partition and getting Linux, I decided to try and install Python 3.3.2 on a 32 bit Intel Core 2 Duo iMac with OS X 10.6.8 Snow Leopard. I did pretty much everything the official website says, but it isn't working at all.

First of all, I downloaded the installer for Mac OS X 6 and later, which should supposedly put a folder called MacPython 3.3 with IDLE, PythonLauncher and a Build Applet tool in my Applications folder. What I have instead is a folder called Python 3.3 which does contain (aside from the documentation and a command to update shell profile) IDLE and PythonLauncher, but no Build Applet tool; I typed 'python' into my Terminal window to see if 3.3.2 was installed, but it said Python 2.6.1 even after restarting my computer. The ReadMe in the disk image that contains the installer says running the installer should also 'put the underlying machinery into the folder /Library/Frameworks/Python.framework'. I did every search imaginable and apparently there is no such folder anywhere in my hard drive.

Basically, I want to install 3.3.2 and run things in programme mode rather than shell mode, which I find to be a huge pain in the bottom. Any help is greatly appreciated.

EDIT: found the Frameworks folder. Python.framework contains 4 folders named 2.3, 2.5, 2.6 and Current, which has several other folders inside – all for Python 2.6. The official page says I shouldn't delete any of them because they already come with Mac. How do I put 3.3 here?

share|improve this question
    
What is programme mode and shell mode? –  Mark Jul 30 '13 at 16:42
1  
You have not found the Frameworks folder - the one you have found is /System/Library/Frameworks/Python.framework/Versions/ which is the Apple installed one the one you want is as the notes say under /Library - How are you looking for the path –  Mark Jul 30 '13 at 16:44
    
According to the guide I'm reading, there are 2 ways to run Python applications, which are programme mode (as standalone applications) and shell mode (by typing commands one by one into the Python shell). –  reggaelizard Jul 30 '13 at 16:49
    
what guide can you give a URL (also looking at my install looks like Build Applet is a python 2 thing - I don't have it either –  Mark Jul 30 '13 at 16:52
    
Oh, there I found /Library. I figured it had to be /System/Library since the /Library in my home folder didn't have any frameworks, but turns out there's a third one with Python 3.3.2. Thanks! –  reggaelizard Jul 30 '13 at 16:53

1 Answer 1

So your mac is still looking for an old version of python. You need to inform it that there is in face a new version and where it can find it. To do this you need to update the PATH to python.

This can be done in your .bash_profile file

# Setting PATH for Python 3.3.2
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.3.2/bin:${PATH}"
export PATH

After you update the .bash_profile file your terminal window should open the new version of python, when you ask for it.

share|improve this answer
1  
Easier to use /usr/local/bin as the path –  Mark Jul 30 '13 at 16:53
    
Thanks a lot! Could you tell me how to access the .bash_profile file? I tried searching for it and I couldn't find it. –  reggaelizard Jul 30 '13 at 16:57
    
It does not exist by default - I would go and read a Unix tutorial to understand some shell programming –  Mark Jul 30 '13 at 16:59
    
Thanks again! I'll get on it immediatly. –  reggaelizard Jul 30 '13 at 17:02
    
Ok, I understand some more about Unix now and I get what .bash_profile does. However, when I run the cat command on it I get exactly what IdeoREX posted – but if I type python I get 2.6.1. Should I move the file to another directory? It's in my home directory right now. –  reggaelizard Jul 31 '13 at 5:24

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.