How to Install with Pip?

Open a terminal or command prompt

Upgrade pip: `python -m pip install –upgrade pip`

Install the package: `pip install package-name`

If needed, use Python 3 explicitly: `python3 -m pip install package-name`

To install a specific version: `pip install package-name==1.2.3`

To install from a requirements file: `pip install -r requirements.txt`

To install from a local file: `pip install ./path/to/package.whl`

To install from a Git repository: `pip install git+https://github.com/user/repo.git`

Verify the installation: `pip show package-name`

Verify in Python: `python -c “import package_name”`

Suggested for You

Trending Today