Python OS X 10.5 development environment

前端 未结 2 1097
遥遥无期
遥遥无期 2021-02-10 14:47

I would like to try out the Google App Engine Python environment, which the docs say runs 2.5.2. As I use OS X Leopard, I have Python 2.5.1 installed, but would like the latest

2条回答
  •  太阳男子
    2021-02-10 15:12

    You can install python on your Mac, and it won't mess with the default installation. However, I strongly recommend that you use MacPorts to install Python, since that will make it much easier for you to install Python libraries and packages further down the road. Additionally, if you try to install a program or library with MacPorts that depends on Python, MacPorts will download a copy of Python, even if you have MacPython installed, so you might end up with redundant copies of Python if you install MacPython but then choose to use MacPorts at a later date. To install Python with MacPorts, download and install MacPorts, then type:

    sudo port install python25 python_select
    sudo python_select python25
    

    Run the following command to view all the MacPorts packages for Python:

    port list | grep py25-
    

    You can install any of the packages on the list by simply typing:

    sudo port install packagename
    

    In the above, replace packagename with the name of the package. On my first install I always run

    sudo port install py25-setuptools
    

    [ NOTE: These commands need to be run from the Terminal -- Applications > Utilities > Terminal.app ]

提交回复
热议问题