@@ -76,7 +76,7 @@ virtual environment you're using, and modify the environment so that running
76
76
``python `` will get you that particular version and installation of Python.
77
77
For example:
78
78
79
- .. code-block :: bash
79
+ .. code-block :: console
80
80
81
81
$ source ~/envs/tutorial-env/bin/activate
82
82
(tutorial-env) $ python
@@ -108,7 +108,7 @@ complete documentation for ``pip``.)
108
108
109
109
You can install the latest version of a package by specifying a package's name:
110
110
111
- .. code-block :: bash
111
+ .. code-block :: console
112
112
113
113
(tutorial-env) $ python -m pip install novas
114
114
Collecting novas
@@ -120,7 +120,7 @@ You can install the latest version of a package by specifying a package's name:
120
120
You can also install a specific version of a package by giving the
121
121
package name followed by ``== `` and the version number:
122
122
123
- .. code-block :: bash
123
+ .. code-block :: console
124
124
125
125
(tutorial-env) $ python -m pip install requests==2.6.0
126
126
Collecting requests==2.6.0
@@ -133,7 +133,7 @@ version is already installed and do nothing. You can supply a
133
133
different version number to get that version, or you can run ``python
134
134
-m pip install --upgrade `` to upgrade the package to the latest version:
135
135
136
- .. code-block :: bash
136
+ .. code-block :: console
137
137
138
138
(tutorial-env) $ python -m pip install --upgrade requests
139
139
Collecting requests
@@ -148,7 +148,7 @@ remove the packages from the virtual environment.
148
148
149
149
``python -m pip show `` will display information about a particular package:
150
150
151
- .. code-block :: bash
151
+ .. code-block :: console
152
152
153
153
(tutorial-env) $ python -m pip show requests
154
154
---
@@ -166,7 +166,7 @@ remove the packages from the virtual environment.
166
166
``python -m pip list `` will display all of the packages installed in
167
167
the virtual environment:
168
168
169
- .. code-block :: bash
169
+ .. code-block :: console
170
170
171
171
(tutorial-env) $ python -m pip list
172
172
novas (3.1.1.3)
@@ -179,7 +179,7 @@ the virtual environment:
179
179
but the output uses the format that ``python -m pip install `` expects.
180
180
A common convention is to put this list in a ``requirements.txt `` file:
181
181
182
- .. code-block :: bash
182
+ .. code-block :: console
183
183
184
184
(tutorial-env) $ python -m pip freeze > requirements.txt
185
185
(tutorial-env) $ cat requirements.txt
@@ -191,7 +191,7 @@ The ``requirements.txt`` can then be committed to version control and
191
191
shipped as part of an application. Users can then install all the
192
192
necessary packages with ``install -r ``:
193
193
194
- .. code-block :: bash
194
+ .. code-block :: console
195
195
196
196
(tutorial-env) $ python -m pip install -r requirements.txt
197
197
Collecting novas==3.1.1.3 (from -r requirements.txt (line 1))
0 commit comments