Skip to content

Commit ced4569

Browse files
Quote all install command components that aren't a bare package name
* As a means to make things easier for new users, quote everything in a `pip install` command that is part of a package that isn't just a bare package name. * Use single quotes for Linux/Mac and use double quotes for Windows to follow existing style conventions.
1 parent 9a82bdf commit ced4569

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

docs/html/cli/pip_install.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Usage
1111

1212
.. tab:: Unix/macOS
1313

14-
.. pip-command-usage:: install "python -m pip"
14+
.. pip-command-usage:: install 'python -m pip'
1515

1616
.. tab:: Windows
1717

@@ -277,16 +277,16 @@ Examples
277277
.. code-block:: shell
278278
279279
python -m pip install SomePackage # latest version
280-
python -m pip install SomePackage==1.0.4 # specific version
280+
python -m pip install 'SomePackage==1.0.4' # specific version
281281
python -m pip install 'SomePackage>=1.0.4' # minimum version
282282
283283
.. tab:: Windows
284284

285285
.. code-block:: shell
286286
287287
py -m pip install SomePackage # latest version
288-
py -m pip install SomePackage==1.0.4 # specific version
289-
py -m pip install 'SomePackage>=1.0.4' # minimum version
288+
py -m pip install "SomePackage==1.0.4" # specific version
289+
py -m pip install "SomePackage>=1.0.4" # minimum version
290290
291291
292292
#. Install a list of requirements specified in a file. See the :ref:`Requirements files <Requirements Files>`.
@@ -349,13 +349,13 @@ Examples
349349

350350
.. code-block:: shell
351351
352-
python -m pip install SomeProject@git+https://git.repo/[email protected]
352+
python -m pip install 'SomeProject@git+https://git.repo/[email protected]'
353353
354354
.. tab:: Windows
355355

356356
.. code-block:: shell
357357
358-
py -m pip install SomeProject@git+https://git.repo/[email protected]
358+
py -m pip install "SomeProject@git+https://git.repo/[email protected]"
359359
360360
361361
#. Install a project from VCS in "editable" mode. See the sections on :doc:`../topics/vcs-support` and :ref:`Editable Installs <editable-installs>`.
@@ -364,20 +364,20 @@ Examples
364364

365365
.. code-block:: shell
366366
367-
python -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
368-
python -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
369-
python -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
370-
python -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
371-
python -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
367+
python -m pip install -e 'git+https://git.repo/some_pkg.git#egg=SomePackage' # from git
368+
python -m pip install -e 'hg+https://hg.repo/some_pkg.git#egg=SomePackage' # from mercurial
369+
python -m pip install -e 'svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage' # from svn
370+
python -m pip install -e 'git+https://git.repo/some_pkg.git@feature#egg=SomePackage' # from 'feature' branch
371+
python -m pip install -e 'git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path' # install a python package from a repo subdirectory
372372
373373
.. tab:: Windows
374374

375375
.. code-block:: shell
376376
377-
py -m pip install -e git+https://git.repo/some_pkg.git#egg=SomePackage # from git
378-
py -m pip install -e hg+https://hg.repo/some_pkg.git#egg=SomePackage # from mercurial
379-
py -m pip install -e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage # from svn
380-
py -m pip install -e git+https://git.repo/some_pkg.git@feature#egg=SomePackage # from 'feature' branch
377+
py -m pip install -e "git+https://git.repo/some_pkg.git#egg=SomePackage" # from git
378+
py -m pip install -e "hg+https://hg.repo/some_pkg.git#egg=SomePackage" # from mercurial
379+
py -m pip install -e "svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage" # from svn
380+
py -m pip install -e "git+https://git.repo/some_pkg.git@feature#egg=SomePackage" # from 'feature' branch
381381
py -m pip install -e "git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path" # install a python package from a repo subdirectory
382382
383383
#. Install a package with `extras`_.
@@ -408,33 +408,33 @@ Examples
408408

409409
.. code-block:: shell
410410
411-
python -m pip install ./downloads/SomePackage-1.0.4.tar.gz
412-
python -m pip install http://my.package.repo/SomePackage-1.0.4.zip
411+
python -m pip install './downloads/SomePackage-1.0.4.tar.gz'
412+
python -m pip install 'http://my.package.repo/SomePackage-1.0.4.zip'
413413
414414
.. tab:: Windows
415415

416416
.. code-block:: shell
417417
418-
py -m pip install ./downloads/SomePackage-1.0.4.tar.gz
419-
py -m pip install http://my.package.repo/SomePackage-1.0.4.zip
418+
py -m pip install "./downloads/SomePackage-1.0.4.tar.gz"
419+
py -m pip install "http://my.package.repo/SomePackage-1.0.4.zip"
420420
421421
#. Install a particular source archive file following :pep:`440` direct references.
422422

423423
.. tab:: Unix/macOS
424424

425425
.. code-block:: shell
426426
427-
python -m pip install SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
428-
python -m pip install "SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
429-
python -m pip install SomeProject@http://my.package.repo/1.2.3.tar.gz
427+
python -m pip install 'SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl'
428+
python -m pip install 'SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl'
429+
python -m pip install 'SomeProject@http://my.package.repo/1.2.3.tar.gz'
430430
431431
.. tab:: Windows
432432

433433
.. code-block:: shell
434434
435-
py -m pip install SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
435+
py -m pip install "SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
436436
py -m pip install "SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl"
437-
py -m pip install SomeProject@http://my.package.repo/1.2.3.tar.gz
437+
py -m pip install "SomeProject@http://my.package.repo/1.2.3.tar.gz"
438438
439439
#. Install from alternative package repositories.
440440

0 commit comments

Comments
 (0)