diff options
| author | Gautham Goli | 2017-10-12 00:29:19 +0530 |
|---|---|---|
| committer | Gautham Goli | 2017-10-13 19:50:46 +0530 |
| commit | 7fa51f71f1a8a21b905bafc1fb4106f0222d654f (patch) | |
| tree | 098d2477a8262a5770310fed4693da31c4392e1c /docs/Homebrew-and-Python.md | |
| parent | afdd0e2437426ec85ff86e5b7562d3a6a69ba3e5 (diff) | |
| parent | 56458f03fcc68ef6d8ee3ee4a7c1d16021aa5800 (diff) | |
| download | brew-7fa51f71f1a8a21b905bafc1fb4106f0222d654f.tar.bz2 | |
Merge branch 'master' into audit_line_rubocop_part_4_rebase_attempt_1
Diffstat (limited to 'docs/Homebrew-and-Python.md')
| -rw-r--r-- | docs/Homebrew-and-Python.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/Homebrew-and-Python.md b/docs/Homebrew-and-Python.md index 692e5c617..8b263cb38 100644 --- a/docs/Homebrew-and-Python.md +++ b/docs/Homebrew-and-Python.md @@ -24,13 +24,13 @@ The Python formulae install [pip](http://www.pip-installer.org) (as `pip2` or `p Setuptools can be updated via pip, without having to re-brew Python: ```sh -pip install --upgrade setuptools +python2 -m pip --upgrade setuptools ``` Similarly, pip can be used to upgrade itself via: ```sh -pip install --upgrade pip +python2 -m pip install --upgrade pip ``` ### Note on `pip install --user` @@ -39,7 +39,7 @@ The normal `pip install --user` is disabled for brewed Python. This is because o A possible workaround (which puts executable scripts in `~/Library/Python/<X>.<Y>/bin`) is: ```sh -pip install --user --install-option="--prefix=" <package-name> +python2 -m pip install --user --install-option="--prefix=" <package-name> ``` ## `site-packages` and the `PYTHONPATH` @@ -86,7 +86,7 @@ CFLAGS=-I$(brew --prefix)/include LDFLAGS=-L$(brew --prefix)/lib pip install <pa Activate the virtualenv *after* you've brewed, or brew in a fresh Terminal window. Homebrew will still install Python modules into Homebrew's `site-packages` and *not* into the virtual environment's site-package. -Virtualenv has a switch to allow "global" (i.e. Homebrew's) `site-packages` to be accessible from within the virtualenv. +Virtualenv has a `--system-site-packages` switch to allow "global" (i.e. Homebrew's) `site-packages` to be accessible from within the virtualenv. ## Why is Homebrew's Python being installed as a dependency? Formulae that depend on the special `:python` target are bottled against the Homebrew Python and require it to be installed. You can avoid installing Homebrew's Python by building these formulae with `--build-from-source`. |
