``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
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
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
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
``python -m pip show`` will display information about a particular package:
-.. code-block:: bash
+.. code-block:: console
(tutorial-env) $ python -m pip show requests
---
``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)
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
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))