Skip to content

Commit 28ab93c

Browse files
author
Jon Wayne Parrott
authored
Fix user base path instructions for Windows users (pypa#384)
* Fix user base path instructions for Windows users * Address review comments
1 parent 35870ac commit 28ab93c

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,23 @@ Use ``pip`` to install Pipenv:
7979
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,
82-
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 --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`_.
82+
you'll need to add the `user base`_'s binary directory to your ``PATH``.
83+
84+
On Linux and macOS you can find the user base binary directory by running
85+
``python -m site --user-base`` and adding ``bin`` to the end. For example,
86+
this will typically print ``~/.local`` (with ``~`` expanded to the
87+
absolute path to your home directory) so you'll need to add
88+
``~/.local/bin`` to your ``PATH``. You can set your ``PATH`` permanently by
89+
`modifying ~/.profile`_.
90+
91+
On Windows you can find the user base binary directory by running
92+
``py -m site --user-site`` and replacing ``site-packages`` with
93+
``Scripts``. For example, this could return
94+
``C:\Users\Username\AppData\Roaming\Python36\site-packages`` so you would
95+
need to set your ``PATH`` to include
96+
``C:\Users\Username\AppData\Roaming\Python36\Scripts``. You can set your
97+
user ``PATH`` permanently in the `Control Panel`_. You may need to log
98+
out for the ``PATH`` changes to take effect.
9099

91100
.. _npm: https://www.npmjs.com/
92101
.. _bundler: http://bundler.io/

0 commit comments

Comments
 (0)