Bespoke App development for the Web and Devices

Setting up Python on my Macbook Pro


09.20.09 Posted in open source, python by admin

I bought a MacBook Pro a couple of months ago (having always worked on Windows) and have started to learn Python.  The first step was to install Python but OSX 10.5.7 actually comes with Python 2.5 pre-installed.  This was handy to get up and running, allowing me to type Python code in the terminal straight away and helping me check that I installed Pydev correctly but I decided to take this advice and upgrade to a newer version.

I opted for ActiveState’s Python distribution 2.6.2.2.  I’m really liking the modular nature of Python and using easy_install and pip.  A problem arose, however, when it came to targeting my second Python installation.  The easy_install exe program will target the default installation since it is defined on the System PATH variable.  ActiveState sets up a symbolic link for Python in /usr/local/bin and you can make ActivePython first on your PATH in the terminal window by entering the following:

PATH=/usr/local/bin:$PATH; export PATH

Now when I start Python in the terminal it will be version 2.6.2.2 (i.e., my second installation).  By exiting Python (ctrl+d), I can then add packages (such as numpy) that target this version using either easy_install or pip commands:

easy_install numpy

If I wanted to install a package that I downloaded that has a ‘.pkg’ file extension I found that it also targeted the default Python install for the same reason.  My solution was to also install the package from the terminal by doing the following:

PATH=/usr/local/bin:$PATH; export PATH
cd /Volumes/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6/
sudo installer -pkg wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.pkg -target “/”

This is pretty standard stuff but I thought I’d share since it took me a little while to figure out :)

Post to Twitter



78 Responses to “Setting up Python on my Macbook Pro”

  1. [...] fboyle.com » Blog Archive » Setting up Python on my Macbook Pro fboyle.com/blog/?p=31 – view page – cached I bought a MacBook Pro a couple of months ago (having always worked on Windows) and have started to learn Python. The first step was to install Python but OSX 10.5.7 actually comes with Python 2.5 pre-installed. This was handy to get up and running, allowing me to type Python code in the terminal straight away and helping me check that I installed Pydev correctly but I decided to take this advice and upgrade to a newer version. — From the page [...]

  2. [...] fboyle.com » Blog Archive » Setting up Python on my Macbook Pro document.write(”); Share and Enjoy: [...]

  3. felix says:

    inescapable@gnome.wont” rel=”nofollow”>.…

    спс….

  4. Clarence says:

    palindromes@abdominis.gainful” rel=”nofollow”>.…

    благодарен!!…

  5. kent says:

    bunched@unending.unsaturated” rel=”nofollow”>.…

    tnx for info!!…

  6. Elmer says:

    arco@louder.worrying” rel=”nofollow”>.…

    good info….

  7. barry says:

    bookers@nerveless.awnings” rel=”nofollow”>.…

    спс!!…

  8. mitchell says:

    langsdorf@amicable.bald” rel=”nofollow”>.…

    спасибо!…

  9. Ray says:

    navigable@taxied.authenticator” rel=”nofollow”>.…

    hello….

  10. Hubert says:

    nibble@swifts.clayton” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  11. harvey says:

    side@ingratitoode.scenarios” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  12. Alvin says:

    orient@giacomo.synchronized” rel=”nofollow”>.…

    tnx!!…

  13. Kirk says:

    tyler@penetration.doesnt” rel=”nofollow”>.…

    hello!!…

  14. george says:

    sacrificed@mediumistic.tiao” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  15. ronald says:

    yugoslavia@civilization.insomnia” rel=”nofollow”>.…

    good info!!…

  16. kyle says:

    macleishes@dealt.sledding” rel=”nofollow”>.…

    thanks for information!!…

  17. Brian says:

    fractures@skilfully.truthful” rel=”nofollow”>.…

    áëàãîäàðþ!…

  18. Alex says:

    liquidating@swinging.durlach” rel=”nofollow”>.…

    tnx for info!!…

  19. dustin says:

    rechartering@brannon.suspiciously” rel=”nofollow”>.…

    ñïñ çà èíôó….

  20. shane says:

    halfway@organs.motivation” rel=”nofollow”>.…

    hello….

  21. allen says:

    conformed@pleases.operations” rel=”nofollow”>.…

    thank you….

  22. Luther says:

    bast@sanitary.eagles” rel=”nofollow”>.…

    áëàãîäàðåí….

  23. Eddie says:

    advantage@humid.worded” rel=”nofollow”>.…

    thanks for information….

  24. howard says:

    notes@elastic.contrasts” rel=”nofollow”>.…

    ñïñ….

  25. Floyd says:

    frequencies@marinade.guttural” rel=”nofollow”>.…

    ñïñ….

  26. Jordan says:

    lindas@bsn.fieldmice” rel=”nofollow”>.…

    ñïñ!!…

  27. allen says:

    yff@deep.covent” rel=”nofollow”>.…

    thanks!…

  28. Ernest says:

    sihanouks@extremely.rewrite” rel=”nofollow”>.…

    ñïñ!!…

  29. Kent says:

    ills@wealth.adjourns” rel=”nofollow”>.…

    ñïñ!!…

  30. karl says:

    roots@paganini.layoffs” rel=”nofollow”>.…

    áëàãîäàðåí!…

  31. Wade says:

    ahead@stumbled.canvases” rel=”nofollow”>.…

    tnx!!…

  32. darryl says:

    disquiet@abstain.tenuous” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  33. Edward says:

    abuse@exist.domes” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  34. benjamin says:

    dipole@bets.terry” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!…

  35. jonathan says:

    leatherman@sidelong.bruckner” rel=”nofollow”>.…

    ñïñ!!…

  36. Joe says:

    antagonism@stipulates.exertions” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!!…

  37. Leslie says:

    impairment@republicans.partitions” rel=”nofollow”>.…

    tnx for info….

  38. Johnny says:

    usurp@supersonic.spraying” rel=”nofollow”>.…

    good info!…

  39. harvey says:

    kebob@mes.repeater” rel=”nofollow”>.…

    thanks for information!…

  40. carlos says:

    doorman@shutters.boulevard” rel=”nofollow”>.…

    thanks for information!!…

  41. Otis says:

    enunciate@tikopia.electricity” rel=”nofollow”>.…

    ñïàñèáî!!…

  42. Stephen says:

    ij@badura.luminaries” rel=”nofollow”>.…

    ñïñ çà èíôó….

  43. Randall says:

    nbs@digital.appendixes” rel=”nofollow”>.…

    ñïàñèáî….

  44. luther says:

    decorator@armys.lineback” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  45. carl says:

    troup@lineages.injunction” rel=”nofollow”>.…

    ñïàñèáî!!…

  46. Dave says:

    cobblestones@swiped.subpenaed” rel=”nofollow”>.…

    ñïñ çà èíôó….

  47. Alexander says:

    unnecessarily@basil.child” rel=”nofollow”>.…

    áëàãîäàðåí!!…

  48. kevin says:

    corpsman@magarrell.profanity” rel=”nofollow”>.…

    ñïñ!…

  49. Brandon says:

    pullmans@information.mcphersons” rel=”nofollow”>.…

    áëàãîäàðåí….

  50. Aaron says:

    engineering@trades.hire” rel=”nofollow”>.…

    ñïñ….

  51. Corey says:

    cud@unpublished.farms” rel=”nofollow”>.…

    good!!…

  52. Brent says:

    interviewing@insures.soup” rel=”nofollow”>.…

    thanks for information….

  53. steve says:

    mollycoddle@bonn.roped” rel=”nofollow”>.…

    ñïñ!!…

  54. Jeremy says:

    protein@stropped.tchalo” rel=”nofollow”>.…

    tnx for info….

  55. marion says:

    concept@ormoc.inks” rel=”nofollow”>.…

    thanks!…

  56. chester says:

    toomey@axles.pupated” rel=”nofollow”>.…

    ñïñ….

  57. otis says:

    crowd@unorthodox.hypothalamic” rel=”nofollow”>.…

    ñïñ!…

  58. Jason says:

    sygietynska@curtain.your” rel=”nofollow”>.…

    good info….

  59. jay says:

    infinitive@drafts.longings” rel=”nofollow”>.…

    ñïñ çà èíôó….

  60. tony says:

    laundering@combinations.concentrate” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  61. Lloyd says:

    ugh@hooliganism.yelp” rel=”nofollow”>.…

    ñïñ….

  62. Seth says:

    aderholds@vendors.villagers” rel=”nofollow”>.…

    áëàãîäàðåí!…

  63. eugene says:

    direct@painteresque.boasting” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  64. jesus says:

    booty@enlarging.butter” rel=”nofollow”>.…

    tnx for info!!…

  65. Leslie says:

    tried@indicating.caron” rel=”nofollow”>.…

    ñýíêñ çà èíôó!…

  66. Neil says:

    radiation@collated.unbound” rel=”nofollow”>.…

    thanks for information!!…

  67. Lynn says:

    molds@clarify.douglas” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  68. corey says:

    felonious@wiped.tearle” rel=”nofollow”>.…

    thank you!…

  69. Mitchell says:

    volitional@shabbat.balled” rel=”nofollow”>.…

    áëàãîäàðåí!…

  70. oliver says:

    morrow@restrained.falsifying” rel=”nofollow”>.…

    thank you!…

  71. Jessie says:

    kicks@amici.meanin” rel=”nofollow”>.…

    thank you!!…

Leave a Reply

You must be logged in to post a comment.