# examples from https://pip.pypa.io/en/stable/reference/requirements-file-format/


# Install SomePackage and its dependencies from PyPI using Requirement 
SomePackage            # latest version
SomePackage==1.0.4     # specific version
SomePackage>=1.0.4   # minimum version


# Install a list of requirements specified in a file. See the Requirements files.
-r requirements.txt


# Install a local project in “editable” mode. See the section on Editable Installs.
-e .                # project in current directory
-e path/to/project  # project in another directory


# Install a project from VCS
SomeProject@git+https://git.repo/some_pkg.git@1.3.1


# Install a project from VCS in “editable” mode. See the sections on VCS Support and Editable Installs.
-e git+https://git.repo/some_pkg.git#egg=SomePackage          # from git
-e hg+https://hg.repo/some_pkg.git#egg=SomePackage            # from mercurial
-e svn+svn://svn.repo/some_pkg/trunk/#egg=SomePackage         # from svn
-e git+https://git.repo/some_pkg.git@feature#egg=SomePackage  # from 'feature' branch
-e git+https://git.repo/some_repo.git#egg=subdir&subdirectory=subdir_path # install a python package from a repo subdirectory


# Install a package with setuptools extras.
SomePackage[PDF]
SomePackage[PDF] @ git+https://git.repo/SomePackage@main#subdirectory=subdir_path
.[PDF]  # project in current directory
SomePackage[PDF]==3.0
SomePackage[PDF,EPUB]  # multiple extras


# Install a particular source archive file.
./downloads/SomePackage-1.0.4.tar.gz
http://my.package.repo/SomePackage-1.0.4.zip


# Install a particular source archive file following PEP 440 direct references.
SomeProject@http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
SomeProject @ http://my.package.repo/SomeProject-1.2.3-py33-none-any.whl
SomeProject@http://my.package.repo/1.2.3.tar.gz


# Install from alternative package repositories.
# Install from a different index, and not PyPI
--index-url http://my.package.repo/simple/ SomePackage


# Install from a local flat directory containing archives (and don’t scan indexes):
--no-index --find-links=file:///local/dir/ SomePackage
--no-index --find-links=/local/dir/ SomePackage
--no-index --find-links=relative/dir/ SomePackage


# Search an additional index during install, in addition to PyPI

# Using this option to search for packages which are not in the main repository
# (such as private packages) is unsafe, per a security vulnerability called
# dependency confusion: an attacker can claim the package on the public repository
# in a way that will ensure it gets chosen over the private package.

--extra-index-url http://my.package.repo/simple SomePackage

# Find pre-release and development versions, in addition to stable versions.
# By default, pip only finds stable versions.

--pre SomePackage


# Install packages from source.
# Do not use any binary packages
SomePackage1 SomePackage2 --no-binary :all:

# Specify SomePackage1 to be installed from source:
SomePackage1 SomePackage2 --no-binary SomePackage1
