How-to articles, tricks, and solutions about PIP
How to upgrade all Python packages with pip?
You can use the pip freeze command to generate a requirements file that includes all of the current packages and their versions, and then use pip install -r to upgrade all packages to the latest available versions.
ImportError: No module named pip
Here is a code snippet that demonstrates how to handle the "No module named pip" error:
Installing specific package version with pip
To install a specific version of a package with pip, you can use the pip install command followed by the package name and the desired version number.
pg_config executable not found
Check the location of pg_config: Open a terminal and run the command "which pg_config".
pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"
This error message occurs when pip is unable to verify the certificate of the website it is trying to connect to.
pip install from git repo branch
You can use pip to install a package from a git repository and specify a branch by using the following syntax:
pip install mysql-python fails with EnvironmentError: mysql_config not found
This error occurs when the mysql-config command is not in the system's PATH.
pip uses incorrect cached package version, instead of the user-specified version
Here is an example of how to use pip to install a specific version of a package, rather than using a cached version: