-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Could not find a version that satisfies the requirement" for package in private repository starting from pipenv==2022.8.31 #5353
Comments
perusing the output above, I'm seeing that the contents of the Pipfile there are completely different than they should be (even though Pipfile.lock is correct; it should contain the same source entry mentioned above), I'll investigate more on that front |
Ok, I see that the root issue seems to be that we were only copying |
@aawilson I am not sure that this is a new behavior, so there may be something else going on, but you found that having the Pipfile allows it to work? It is an interesting observation, apparently |
It's pretty interesting, I definitely get the "broken" behavior in 2022.8.31 and not in 2022.8.30 (since it's a container it's easy to remake the intermediate image up to failure and try different versions). Something seems to have changed between those two versions to get the specified behavior. |
@aawilson Just to clarify -- does it work to install if you include the |
Inside Lines 1638 to 1643 in 9572c31
Therefore pipenv/pipenv/utils/indexes.py Lines 68 to 98 in 9572c31
|
To address this issue, there's a fix that is throwing all the indexes written inside Pipfile.lock into This could lead to an issue like: "I want to install A from index X, but A is installed from index Y. I don't want that because A from Y is broken." |
Yes, this is what I am thinking
This is not quite accurate -- the resolver was patched for the specific indexes, but once packages resolve they are hashed.
Because the normal index specified packages are hashed, the install phase is less sensitive -- If you are installing package A with hash Z then it has to be the same package whether you get it from X or Y -- that is how it works today with batch install as long as you have your In fact the default behavior is to search all sources. For regular |
Yeah, it's up there but to confirm explicitly, adding Pipfile to the |
Yeah I'll give it a whirl today |
Confirmed success, thanks very much everyone who chipped in. (for posterity, confirmation was done by rolling back my fix above (adding |
Awesome, thanks for checking @aawilson -- I cut a new version last night to pypi which included this fix. |
Issue description
With a Pipfile like this...
that generates a Pipfile.lock like this...
but when we execute
pipenv sync --verbose
, it generates a pip install command like so(note "-i https://pypi.org/simple")
and as might be expected, this fails with
6.552 ERROR: Could not find a version that satisfies the requirement ourinternalpackage==0.1.1 (from versions: none)
. This appears to have started happening with 2022.8.31--when wepip install -U pipenv==2022.8.30
and runpipenv sync
from there, the package resolves successfully.Expected result
I would expect the package install to generate with a -i pointed at the
our-pypi
source rather than the default.Actual result
There are also bunches of these, that may or may not be irrelevant. I can't provide the full --verbose output because cleansing it of work-internal information would be too much hassle, but I have it around if anyone wants specific snippets.
Steps to replicate
See above
Please run
$ pipenv --support
, and paste the results here. Don't put backticks (`
) around it! The output already contains Markdown formatting.$ pipenv --support
Pipenv version:
'2022.9.8'
Pipenv location:
'/usr/local/lib/python3.8/site-packages/pipenv'
Python location:
'/usr/local/bin/python'
OS Name:
'posix'
User pip version:
'22.2.2'
user Python installations found:
3.8.14
:/usr/local/bin/python
3.8.14
:/usr/local/bin/python3
3.8.14
:/usr/local/bin/python3.8
3.7.3
:/usr/bin/python3
3.7.3
:/usr/bin/python3.7
3.7.3
:/usr/bin/python3.7m
2.7.16
:/usr/bin/python
2.7.16
:/usr/bin/python2.7
2.7.16
:/usr/bin/python2
PEP 508 Information:
System environment variables:
PIPENV_VENV_IN_PROJECT
HOSTNAME
PYTHON_VERSION
PWD
PYTHON_SETUPTOOLS_VERSION
PIPENV_CACHE_DIR
HOME
LANG
LS_COLORS
GPG_KEY
PYTHONPATH
TERM
SHLVL
PYTHON_PIP_VERSION
PYTHON_GET_PIP_SHA256
PYTHON_GET_PIP_URL
PATH
_
PIP_DISABLE_PIP_VERSION_CHECK
PIP_PYTHON_PATH
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_VENV_IN_PROJECT
:1
PIPENV_CACHE_DIR
:/tmp
Debug–specific environment variables:
PATH
:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG
:C.UTF-8
PWD
:/code
Contents of
Pipfile
('/code/Pipfile'):Contents of
Pipfile.lock
('/code/Pipfile.lock'):(see above for selected snippets, full output not included for reasons stated above)
The text was updated successfully, but these errors were encountered: