You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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::
17
18
18
-
It's basic commands are **update**, **install**, and **remove**.
19
+
export PATH=/usr/local/bin:$PATH
19
20
20
-
.. man brew
21
-
22
-
23
-
And we can now install Python 2.7: ::
21
+
Now, we can install Python 2.7: ::
24
22
25
23
$ brew install python --framework
26
24
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``::
27
26
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
31
28
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.
33
30
34
31
35
32
Distribute & Pip
@@ -44,8 +41,6 @@ To install pip, simply open a command prompt and run::
44
41
$ easy_install pip
45
42
46
43
47
-
48
-
49
44
Virtualenv
50
45
----------
51
46
@@ -59,7 +54,11 @@ To set up a new Python environment, change the working directory to where ever y
59
54
60
55
$ virtualenv --distribute venv
61
56
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.
63
58
64
59
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.
65
60
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