Skip to content

Commit afa7478

Browse files
authored
Update virtualenvs.rst
1 parent 7ce4295 commit afa7478

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

docs/dev/virtualenvs.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,23 @@ Use ``pip`` to install Pipenv:
8282
8383
.. Note:: This does a `user installation`_ to prevent breaking any system-wide
8484
packages. If ``pipenv`` isn't available in your shell after installation,
85-
you'll need to add the `user base`_'s ``bin`` directory to your ``PATH``.
86-
You can find the user base by running ``python -m site`` which will print
87-
site information including the user base. For example, on Linux this will
88-
return ``USER_BASE: '~/.local'`` so you'll need to add ``~/.local/bin`` to
89-
your ``PATH``. On Linux and macOS you can set your ``PATH`` permanently
90-
by `modifying ~/.profile`_. On Windows you can set the user
91-
``PATH`` permanently in the `Control Panel`_.
85+
you'll need to add the `user base`_'s binary directory to your ``PATH``.
86+
87+
On Linux and macOS you can find the user base binary directory by running
88+
``python -m site --user-base`` and adding ``bin`` to the end. For example,
89+
this will typically print ``~/.local`` (with ``~`` expanded to the
90+
absolute path to your home directory) so you'll need to add
91+
``~/.local/bin`` to your ``PATH``. You can set your ``PATH`` permanently by
92+
`modifying ~/.profile`_.
93+
94+
On Windows you can find the user base binary directory by running
95+
``py -m site --user-site`` and replacing ``site-packages`` with
96+
``Scripts``. For example, this could return
97+
``C:\Users\Username\AppData\Roaming\Python36\site-packages`` so you would
98+
need to set your ``PATH`` to include
99+
``C:\Users\Username\AppData\Roaming\Python36\Scripts``. You can set your
100+
user ``PATH`` permanently in the `Control Panel`_. You may need to log
101+
out for the ``PATH`` changes to take effect.
92102

93103
.. _npm: https://www.npmjs.com/
94104
.. _bundler: http://bundler.io/

0 commit comments

Comments
 (0)