Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get pip to list the repositories it's using?

Tags:

python

pip

I'm trying to get a codebase running on my machine, and pip isn't finding some of the dependencies. It seems to find them on another machine, so I'd like to see which repos pip is using on the two machines so I can compare.

How can I do this?

like image 905
Jack M Avatar asked Aug 16 '18 10:08

Jack M


People also ask

How to see a list of all packages installed using pip?

In order to see a list of all packages installed using pip you can use pip list command in the terminal. Get a List of installed pip packages. Syntax: pip list [options]

How to find Python list installed modules and version using pip?

How to find Python List Installed Modules and Version using pip? 1 Using help () function (without pip):#N#The simplest way is to open a Python console and type the following... 2 Using pip to find Python list installed modules and their Versions: More ...

What is the use of Pip in Python?

pip is the package installer for python. Pip allows you to install packages from PyPI and other repositories. Python comes with pip by default. To check if pip is available on your computer, you can open the command prompt (or Powershell) on Windows and type the following command: pip --V.

What is editable_project_location in Pip list?

When some packages are installed in editable mode, pip list outputs an additional column that shows the directory where the editable project is located (i.e. the directory that contains the pyproject.toml or setup.py file). The json format outputs an additional editable_project_location field.


1 Answers

Update for pip>=20

The repositories are now listed by default, no need to pass the --verbose arg:

$ pip download --no-cache-dir "foo<0" 2>&1 | grep Looking
Looking in indexes: https://pypi.org/simple, https://my-index.local, http://127.0.0.1:9000

Original answer

The repositories where pip searches for packages are displayed when using --verbose flag: pip install --verbose ... or pip download --verbose .... Specify some non-existent requirement so pip does not actually download/install anything. Example:

$ pip download --no-cache-dir --verbose "foo<0" 2>&1 | grep Looking
Looking in indexes: https://pypi.org/simple, https://my-index.local, http://127.0.0.1:9000
like image 120
hoefling Avatar answered Oct 11 '22 17:10

hoefling