CoderDojoSV / beginner-python

Create programs with Python! 6-week workshop
Past Project
51 stars 26 forks source link

Install issues on OSX 10.9.1 #8

Open bskinny129 opened 10 years ago

bskinny129 commented 10 years ago

From a parent that went through the install:

Hi, I just wanted to note that the instructions have us download the installer from the Hello World! book, but are missing an important step which may affect some users: On OSX 10.9.1 Mavericks, with Apple's version of Python 2.7.5 pre-installed, the 'Hello World!' installer appears to install python.org's version of Python 2.7.5 into the 'Applications' directory. However, the installer does not automatically run '/Applications/Python 2.7/Update Shell Profile.command'. This leaves Apple's python2.7 (/usr/bin/python2.7) as the default rather than python.org's python2.7 (/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7). As a result, the necessary site-packages such as 'pygame' and 'PyQt4' cannot be found: $ which python /usr/bin/python $ python -c 'import site; print site.getsitepackages()' ['/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/Library/Python/2.7/site-packages'] $ python -c 'import pygame; import PyQt4' Traceback (most recent call last): File "", line 1, in ImportError: No module named pygame The solution is to manually run 'Update Shell Profile.command', after which things will work as expected: $ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python $ python -c 'import site; print site.getsitepackages()' ['/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/site-python', '/Library/Python/2.7/site-packages'] $ python -c 'import pygame; import PyQt4'

bskinny129 commented 10 years ago

@wsande - Also, do we know how to tell IDLE to use Python 2.X rather than 3.X? I remember some kids last time had that issue ...

wescpy commented 10 years ago

IDLE is available for 2.x and 3.x, so whichever is the default version of Python is what will get executed. i'm wondering if there's a reason why the installer installs its own version of Python, which is generally problematic for Macs for the exact reason brian describes. (it really doesn't make sense if it installs an older or the same version of Python.)

umeshpn commented 10 years ago

Idle is not available on the mac (Maverick) I have. It is giving the error "\ IDLE can't import Tkinter. Your Python may not be configured for Tk. **". Which editor is recommended for the students?

On Mon, Feb 10, 2014 at 9:21 PM, wesley chun notifications@github.comwrote:

IDLE is available for 2.x and 3.x, so whichever is the default version of Python is what will get executed. i'm wondering if there's a reason why the installer installs its own version of Python, which is generally problematic for Macs for the exact reason brian describes. (it really doesn't make sense if it installs an older or the same version of Python.)

— Reply to this email directly or view it on GitHubhttps://github.com/CoderDojoSV/beginner-python/issues/8#issuecomment-34727292 .

umesh.p.nair@gmail.com | ɯoɔ˙lıɐɯƃ@ɹıɐu˙d˙ɥsǝɯn

cartr commented 10 years ago

I'm pretty sure that the copy of IDLE the Mac installer creates uses the correct installation with all the modules. Users shouldn't run into problems with IDLE if they use the installer.