File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 141141
142142 (.venv) $ python -m pip install "pandas>=2"
143143
144+ However, ``pip `` does not usually carry out any checks to protect against
145+ tampering and allows arbitrary code from the distributions to be executed. You
146+ can, however, use ``pip `` in a way that ensures more secure installation
147+ mechanisms:
148+
149+ ``--require-hashes ``
150+ enables hash verification mode.
151+
152+ This ensures that hashes have been provided in the requirements file. It is
153+ also a convenient way to create a list of hashes yourself, as it displays
154+ the hashes of the downloaded packages. However, only the preferred archive
155+ is downloaded for each package, so you may still need to add hashes for
156+ alternative archives using :samp: `pip hash { PACKAGE_NAME } ` – for example, if
157+ different operating system variants are available.
158+
159+ ``--only-binary :all: ``
160+ prevents source code from being provided.
161+
162+ .. seealso ::
163+ * `Secure installs <https://pip.pypa.io/en/stable/topics/secure-installs/ >`_
164+ * `pip hash <https://pip.pypa.io/en/stable/cli/pip_hash/ >`_
165+
144166Proxy server
145167~~~~~~~~~~~~
146168
You can’t perform that action at this time.
0 commit comments