Python LanguageUsage of "pip" module: PyPI Package Manager

Introduction

Sometimes you may need to use pip package manager inside python eg. when some imports may raise ImportError and you want to handle the exception. If you unpack on Windows Python_root/Scripts/pip.exeinside is stored __main__.py file, where main class from pip package is imported. This means pip package is used whenever you use pip executable. For usage of pip as executable see: pip: PyPI Package Manager

Syntax

pip.<function|attribute|class> where function is one of:

autocomplete()

Command and option completion for the main option parser (and options) and its subcommands (and options). Enable by sourcing one of the completion shell scripts (bash, zsh or fish).