From a1de5000733db1bf0e91c60dd67efbff017560ba Mon Sep 17 00:00:00 2001 From: Nar Kumar Chhantyal Date: Fri, 26 Aug 2016 17:01:57 +0200 Subject: [PATCH 1/2] Do not recommend --prefix= hack, this breaks default pip command --- docs/Homebrew-and-Python.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/Homebrew-and-Python.md b/docs/Homebrew-and-Python.md index 5b8676dbc01de..42fdd31aea25d 100644 --- a/docs/Homebrew-and-Python.md +++ b/docs/Homebrew-and-Python.md @@ -33,15 +33,6 @@ Similarly, Pip can be used to upgrade itself via: The normal `pip install --user` is disabled for brewed Python. This is because of a bug in distutils, because Homebrew writes a `distutils.cfg` which sets the package `prefix`. -A possible workaround (which puts executable scripts in `~/Library/Python/./bin`) is: - - pip install --user --install-option="--prefix=" - -You can make this "empty prefix" the default by adding a `~/.pydistutils.cfg` file with the following contents: - - [install] - prefix= - ## `site-packages` and the `PYTHONPATH` The `site-packages` is a directory that contains Python modules (especially bindings installed by other formulae). Homebrew creates it here: From b0bdee46d1c55268398f139f9cff4caac108b5ae Mon Sep 17 00:00:00 2001 From: Nar Kumar Date: Mon, 7 Nov 2016 12:33:28 +0100 Subject: [PATCH 2/2] Only remove .pydistutils.cfg option, not command line --- docs/Homebrew-and-Python.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/Homebrew-and-Python.md b/docs/Homebrew-and-Python.md index 42fdd31aea25d..2500b859217b5 100644 --- a/docs/Homebrew-and-Python.md +++ b/docs/Homebrew-and-Python.md @@ -33,6 +33,10 @@ Similarly, Pip can be used to upgrade itself via: The normal `pip install --user` is disabled for brewed Python. This is because of a bug in distutils, because Homebrew writes a `distutils.cfg` which sets the package `prefix`. +A possible workaround (which puts executable scripts in `~/Library/Python/./bin`) is: + + pip install --user --install-option="--prefix=" + ## `site-packages` and the `PYTHONPATH` The `site-packages` is a directory that contains Python modules (especially bindings installed by other formulae). Homebrew creates it here: