2

I would like to install a package from private repo but when I run this:

pip install myapp -i https://myrepo.net/pypi/myfeed/simple

I got this error

ERROR: Could not find a version that satisfies the requirement myapp (from versions: none)
ERROR: No matching distribution found for myapp

I assume this is because requirements for this package are not in the private repo, so I tried to add extra-index-url

pip install myapp -i https://myrepo.net/pypi/myfeed/simple --extra-index-url https://pypi.python.org/pypi

But I got the exact same error

What am I doing wrong?

bAN
  • 13,375
  • 16
  • 60
  • 93
  • Does the private repo have a ```requirements.txt```? – kshitij86 Jun 09 '20 at 13:15
  • @Kshitij what do you mean? Is this a file for the entire repo? Or do you mean for the myapp package ? – bAN Jun 09 '20 at 14:04
  • The requirements for the package must be in a requirements file so that ```pip``` can install these for running the package. – kshitij86 Jun 09 '20 at 14:37
  • I did the build using poetry, I have a tar.gz and a .whl. Do you mean I need a requirement.txt next to these files? – bAN Jun 09 '20 at 14:46
  • If you have a ```.whl``` file try [this](https://stackoverflow.com/questions/27885397/how-do-i-install-a-python-package-with-a-whl-file0) – kshitij86 Jun 09 '20 at 14:51
  • The error seems to indicate that a compatible distribution of `myapp` does not exist on your private repo. Can you include the output of `pip install myapp -i https://myrepo.net/pypi/myfeed/simple --verbose`? – Dustin Ingram Jun 09 '20 at 16:32
  • Thanks @DustinIngram, the --verbose option makes me know that the version of python specified in myapp package is not compatible with the one installed in the virtualenv where I tried to install the package.. I'm a dumb guy :-( But the error message could be more precise.. – bAN Jun 09 '20 at 19:07
  • Glad to hear that resolved it. I've added that as the answer. – Dustin Ingram Jun 09 '20 at 19:13

1 Answers1

2

It's likely that either myapp was not found on your index at all, or that a compatible distribution of myapp does not exist - for example, it requires a different version of Python than you are attempting to install with.

Running pip with the --verbose flag should tell you why it wasn't able to install myapp:

pip install myapp -i https://myrepo.net/pypi/myfeed/simple  --verbose
Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82