@@ -83,10 +83,10 @@ please install the latest 3.x version from `python.org`_ or refer to the
8383.. Note :: Due to the way most Linux distributions are handling the Python 3
8484 migration, Linux users using the system Python without creating a virtual
8585 environment first should replace the ``python `` command in this tutorial
86- with ``python3 `` and the `` python -m pip `` command with `` python3 -m pip --user ``. Do * not *
87- run any of the commands in this tutorial with ``sudo ``: if you get a
88- permissions error, come back to the section on creating virtual environments,
89- set one up, and then continue with the tutorial as written.
86+ with ``python3 ``. Do * not * run any of the commands in this tutorial with
87+ ``sudo ``: if you get a permissions error, come back to the section on
88+ creating virtual environments, set one up, and then continue with the
89+ tutorial as written.
9090
9191.. _getting started tutorial : https://opentechschool.github.io/python-beginners/en/getting_started.html#what-is-python-exactly
9292.. _python.org : https://www.python.org
@@ -404,60 +404,6 @@ Upgrade an already installed ``SomeProject`` to the latest from PyPI:
404404
405405 py -m pip install --upgrade SomeProject
406406
407- .. _`Installing to the User Site` :
408-
409- Installing to the User Site
410- ===========================
411-
412- To install :term: `packages <Distribution Package> ` that are isolated to the
413- current user, use the ``--user `` flag:
414-
415- .. tab :: Unix/macOS
416-
417- .. code-block :: bash
418-
419- python3 -m pip install --user SomeProject
420-
421- .. tab :: Windows
422-
423- .. code-block :: bat
424-
425- py -m pip install --user SomeProject
426-
427- For more information, see the `User Installs
428- <https://pip.pypa.io/en/latest/user_guide/#user-installs> `_ section
429- from the pip docs.
430-
431- Note that the ``--user `` flag has no effect when inside a virtual environment
432- – all installation commands will affect the virtual environment.
433-
434- If ``SomeProject `` defines any command-line scripts or console entry points,
435- ``--user `` will cause them to be installed inside the `user base `_'s binary
436- directory, which may or may not already be present in your shell's
437- :envvar: `PATH `. (Starting in version 10, pip displays a warning when
438- installing any scripts to a directory outside :envvar: `PATH `.) If the scripts
439- are not available in your shell after installation, you'll need to add the
440- directory to your :envvar: `PATH `:
441-
442- - On Linux and macOS you can find the user base binary directory by running
443- ``python -m site --user-base `` and adding ``bin `` to the end. For example,
444- this will typically print ``~/.local `` (with ``~ `` expanded to the absolute
445- path to your home directory), so you'll need to add ``~/.local/bin `` to your
446- ``PATH ``. You can set your ``PATH `` permanently by `modifying ~/.profile `_.
447-
448- - On Windows you can find the user base binary directory by running ``py -m
449- site --user-site `` and replacing ``site-packages `` with ``Scripts ``. For
450- example, this could return
451- ``C:\Users\Username\AppData\Roaming\Python36\site-packages ``, so you would
452- need to set your ``PATH `` to include
453- ``C:\Users\Username\AppData\Roaming\Python36\Scripts ``. You can set your user
454- ``PATH `` permanently in the `Control Panel `_. You may need to log out for the
455- ``PATH `` changes to take effect.
456-
457- .. _user base : https://docs.python.org/3/library/site.html#site.USER_BASE
458- .. _modifying ~/.profile : https://stackoverflow.com/a/14638025
459- .. _Control Panel : https://learn.microsoft.com/en-us/windows/win32/shell/user-environment-variables
460-
461407 Requirements files
462408==================
463409
0 commit comments