Skip to content

Commit 66aa3a9

Browse files
authored
Recommend the --user-base option (pypa#374)
Reading the code for @ofek's ``pybin`` utility reminded me that ``python -m site`` accepts options to display just the particular setting that you're interested in instead of showing all of them.
1 parent ac759e6 commit 66aa3a9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

source/new-tutorials/installing-and-using-packages.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ Use ``pip`` to install Pipenv:
8080
.. Note:: This does a `user installation`_ to prevent breaking any system-wide
8181
packages. If ``pipenv`` isn't available in your shell after installation,
8282
you'll need to add the `user base`_'s ``bin`` directory to your ``PATH``.
83-
You can find the user base by running ``python -m site`` which will print
84-
site information including the user base. For example, on Linux this will
85-
return ``USER_BASE: '~/.local'`` so you'll need to add ``~/.local/bin`` to
86-
your ``PATH``. On Linux and macOS you can set your ``PATH`` permanently
87-
by `modifying ~/.profile`_. On Windows you can set the user
88-
``PATH`` permanently in the `Control Panel`_.
83+
You can find the user base by running ``python -m site --user-base`` which
84+
will print out the user base directory. For example, on Linux this will
85+
return ``'~/.local'`` (with ``~`` expanded to the absolute path to your
86+
home directory) so you'll need to add ``~/.local/bin`` to your ``PATH``.
87+
On Linux and macOS you can set your ``PATH`` permanently by `modifying
88+
~/.profile`_. On Windows you can set the user ``PATH`` permanently in the
89+
`Control Panel`_.
8990

9091
.. _npm: https://www.npmjs.com/
9192
.. _bundler: http://bundler.io/

0 commit comments

Comments
 (0)