Let’s say you have a Python module somehow installed on a computer, so you can “import” it, and you want to find a path to this module to check its source files. In this note i am showing how to list all the locally installed Python modules and how to find the paths to these […]
python
Indexed by Google: Pages Checker on Python
To check if a webpage has been indexed by Google, you can manually search for site:<webpage> in a Google Search, for example: site:https://www.shellhacks.com/indexed-by-google-pages-checker-on-python. If the page is indexed by Google, you will see the URL in the result of the Google Search, otherwise you will see the message as follows: Your search – site:https://www.shellhacks.com/indexed-by-google-pages-checker-on-python – […]
PIP: Install From Private PyPi Repository
By default pip installs packages from a public PyPi repository but can also be configured to install them from the private repositories, like Nexus or Artifactory. In this note i will show how to configure pip to install packages from the private repositories. I will also show how to define username and password in pip […]
Pip: Install Requirements – Exclude Specific Packages
The requirements.txt file that contains the Python application dependencies is usually generated by developers using the pip freeze > requirements.txt command. If you install dependencies with the pip install -r requirements.txt command as a part of some automated pipeline or a Dockerfile and you have an issue with some of the dependencies, you may wonder […]
Pip: Show Python Package Dependencies
The dependencies of the installed Python packages can be listed using the built-in pip show command. Alternatively the dependencies can be shown as a tree structure using the pipdeptree command. In this note i will show several examples of how to list dependencies of the installed Python packages.
Pip Install – SSL Error: Certificate_Verify_Failed
If you are trying to install some Python package using the pip install command and pip fails to verify the SSL certificate, you may receive the error as follows: Could not fetch URL https://pypi.org/…/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.org’, port=443): Max retries exceeded with url: /…/ (Caused by SSLError(SSLCertVerificationError(1, ‘[ SSL: […]
Pip – Install Specific Version of a Package
By default, the pip install command installs the latest version of a package. However, it is often necessary to install an old version of a package to much some specific requirements. In this post i am showing how to install the specific version of a package using the pip install command.
Python: How To Use Pip – Basic Commands
What is Pip? pip is a tool for installing and managing Python packages. With pip command you can install, list, upgrade (update), downgrade and uninstall Python packages. In this post i am showing how to use pip from the command line by giving examples of the basic pip commands.
Python: Virtualenv – Install | Create | (De)activate
virtualenv serves for creating isolated Python environments. It creates a folder with a copy of Python interpreter and a copy of the pip library which will be used to install other packages in this virtual environment without affecting other projects or system-wide libraries. virtualenv makes it easier to work on more than one project at […]
Python: Install Pip – MacOS, Ubuntu, CentOS
What is Pip? pip is a tool for installing and managing Python packages. As well as Python, pip can be install on various operation systems: Linux, Mac, Windows, etc. In this post i am showing how to install pip on MacOS and how to install pip on Linux (Ubuntu and CentOS).