Skip to content

Commit 7d50ce2

Browse files
committed
Python note: Some Pip notes
1 parent 35d5fa8 commit 7d50ce2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Python.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,38 @@ sys.path.insert(0, os.path.abspath(
310310
import fully.qualified.module.path
311311
----
312312

313+
== Some Pip notes
314+
315+
* To create a working environment requirement with `pip`:
316+
+
317+
[source,sh,linenums]
318+
----
319+
pip freeze > stable-req.txt
320+
----
321+
322+
* To install *editable* packages with `pip` (maybe from a `file:///` or SVN or Git, ...):
323+
+
324+
[source,sh,linenums]
325+
----
326+
pip install -e URI
327+
----
328+
329+
* To install requirements from requirement file:
330+
+
331+
[source,sh,linenums]
332+
----
333+
pip install -r requirements.txt
334+
----
335+
336+
* To install current directory as package:
337+
+
338+
[source,sh,linenums]
339+
----
340+
pip install -e .
341+
----
342+
343+
* `pip`'s `requirement.txt` format: http://www.pip-installer.org/en/1.1/requirements.html
344+
313345
== FAQs
314346

315347
=== Why global interpreter lock (GIL) in CPython?

0 commit comments

Comments
 (0)