Skip to content

Commit efbc4f3

Browse files
author
Kenneth Reitz
committed
osx update
1 parent 160731b commit efbc4f3

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

docs/starting/install/osx.rst

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,27 @@ Installing Python on Mac OS X
66
Package Manager
77
---------------
88

9-
While Snow Leopard comes with a large number of UNIX utilities, those
10-
familiar with Linux systems will notice one key component missing: a
11-
package manager. Mxcl's `Homebrew <http://mxcl.github.com/homebrew/>`_ is the answer.
9+
While Lions comes with a large number of UNIX utilities, those
10+
familiar with Linux systems will notice one key component missing: a decent
11+
package manager. `Homebrew <http://mxcl.github.com/homebrew/>`_ fills this void.
1212

13-
To `install Homebrew <https://github.com/mxcl/homebrew/wiki/installation>`_, simply run: ::
13+
To `install Homebrew <https://github.com/mxcl/homebrew/wiki/installation>`_, simply run::
1414

1515
$ ruby -e "$(curl -fsS https://raw.github.com/gist/323731)"
1616

17+
Then, insert the hombrew directory at the top of your ``PATH`` enviornment variable. You can do this by adding the following line at the bottom of your ``~/.bashrc`` file::
1718

18-
It's basic commands are **update**, **install**, and **remove**.
19+
export PATH=/usr/local/bin:$PATH
1920

20-
.. man brew
21-
22-
23-
And we can now install Python 2.7: ::
21+
Now, we can install Python 2.7: ::
2422

2523
$ brew install python --framework
2624

25+
This will take a minute or two. Once that's complete, you'll have to add the new Python scripts directory to your ``PATH``::
2726

28-
The ``--framework`` option tells Homebrew to compile a Framework-style Python build, rather than a UNIX-style build. The outdated version of Python that Snow Leopard comes packaged with
29-
is built as a Framework, so this helps avoid some future module installation
30-
bugs.
27+
export PATH=$PATH:/usr/local/share/python
3128

32-
*Don't forget to update your environment PATH.*
29+
The ``--framework`` option tells Homebrew to compile a Framework-style Python build, rather than a UNIX-style build. The outdated version of Python that Snow Leopard comes packaged with is built as a Framework, so this helps avoid some future module installation bugs.
3330

3431

3532
Distribute & Pip
@@ -44,8 +41,6 @@ To install pip, simply open a command prompt and run::
4441
$ easy_install pip
4542

4643

47-
48-
4944
Virtualenv
5045
----------
5146

@@ -59,7 +54,11 @@ To set up a new Python environment, change the working directory to where ever y
5954

6055
$ virtualenv --distribute venv
6156

62-
To use an environment, run `source venv/bin/activate``. Your command prompt will change to show the active environment. Once you have finished working in the current virtual environment, run ``deactivate`` to restore your settings to normal.
57+
To use an environment, run ``source venv/bin/activate``. Your command prompt will change to show the active environment. Once you have finished working in the current virtual environment, run ``deactivate`` to restore your settings to normal.
6358

6459
Each new environment automatically includes a copy of ``pip``, so that you can setup the third-party libraries and tools that you want to use in that environment. Put your own code within a subdirectory of the environment, however you wish. When you no longer need a particular environment, simply copy your code out of it, and then delete the main directory for the environment.
6560

61+
62+
--------------------------------
63+
64+
This page is a remixed version of `another guide <http://www.stuartellis.eu/articles/python-development-windows/>`_, which is available under the same license.

0 commit comments

Comments
 (0)