diff options
author | partev <petrosyan@gmail.com> | 2024-10-13 16:46:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-13 16:46:15 (GMT) |
commit | 6c386b703d19aaec9a34fd1e843a4d0a144ad14b (patch) | |
tree | fff4973af76c52a7cbfdd050a236a8034a58469a /Doc/tutorial | |
parent | cd0f9d111a040ad863c680e9f464419640c8c3fd (diff) | |
download | cpython-6c386b703d19aaec9a34fd1e843a4d0a144ad14b.zip cpython-6c386b703d19aaec9a34fd1e843a4d0a144ad14b.tar.gz cpython-6c386b703d19aaec9a34fd1e843a4d0a144ad14b.tar.bz2 |
gh-125403: fix console formatting in Chapter 12 of the tutorial (#125404)
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/venv.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/tutorial/venv.rst b/Doc/tutorial/venv.rst index 91e4ce1..f362e19 100644 --- a/Doc/tutorial/venv.rst +++ b/Doc/tutorial/venv.rst @@ -76,7 +76,7 @@ virtual environment you're using, and modify the environment so that running ``python`` will get you that particular version and installation of Python. For example: -.. code-block:: bash +.. code-block:: console $ source ~/envs/tutorial-env/bin/activate (tutorial-env) $ python @@ -108,7 +108,7 @@ complete documentation for ``pip``.) You can install the latest version of a package by specifying a package's name: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip install novas Collecting novas @@ -120,7 +120,7 @@ You can install the latest version of a package by specifying a package's name: You can also install a specific version of a package by giving the package name followed by ``==`` and the version number: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip install requests==2.6.0 Collecting requests==2.6.0 @@ -133,7 +133,7 @@ version is already installed and do nothing. You can supply a different version number to get that version, or you can run ``python -m pip install --upgrade`` to upgrade the package to the latest version: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip install --upgrade requests Collecting requests @@ -148,7 +148,7 @@ remove the packages from the virtual environment. ``python -m pip show`` will display information about a particular package: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip show requests --- @@ -166,7 +166,7 @@ remove the packages from the virtual environment. ``python -m pip list`` will display all of the packages installed in the virtual environment: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip list novas (3.1.1.3) @@ -179,7 +179,7 @@ the virtual environment: but the output uses the format that ``python -m pip install`` expects. A common convention is to put this list in a ``requirements.txt`` file: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip freeze > requirements.txt (tutorial-env) $ cat requirements.txt @@ -191,7 +191,7 @@ The ``requirements.txt`` can then be committed to version control and shipped as part of an application. Users can then install all the necessary packages with ``install -r``: -.. code-block:: bash +.. code-block:: console (tutorial-env) $ python -m pip install -r requirements.txt Collecting novas==3.1.1.3 (from -r requirements.txt (line 1)) |