Python / pip

Python / pip: py -m pip install <package> — Windows

Install a package into the selected interpreter.

Availability: Third-party software; install and version dependent.中文

Syntax

py -m pip install <package>

Examples

Install a package into the selected interpreter.

py -m pip install <package>

Parameters, options and clauses

Option / clauseDescription
<package>Specify one or more packages to install.
-r, --requirement <file>Install packages listed in a requirements file.
-U, --upgradeUpgrade specified packages to available newer versions.
--no-depsDo not install package dependencies.
--index-url <url>Choose the package index URL.
--userInstall to the user site where supported.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory