"Could not find a version that satisfies the requirement" for package in private repository starting from pipenv==2022.8.31
See original GitHub issueIssue description
With a Pipfile like this…
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://pypi.ourinternalrepo.com/simple"
verify_ssl = true
name = "our-pypi"
[packages]
..etc..
ourinternalpackage = {version = "==0.5.9", index = "our-pypi"}
that generates a Pipfile.lock like this…
{
"_meta": {
"hash": {
"sha256": "something"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.8"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
},
{
"name": "our-pypi",
"url": "https://pypi.ourinternalrepo.com/simple",
"verify_ssl": true
}
]
},
"default": {
"ourinternalpackage ": {
"hashes": [
"sha256:something"
],
"index": "our-pypi",
"version": "==0.1.1"
},
...etc
but when we execute pipenv sync --verbose
, it generates a pip install command like so
/usr/local/lib/python3.8/site-packages/pipenv/patched/pip/__pip-runner__.py install -i https://pypi.org/simple --no-input --upgrade --no-deps --exists-action=i -r /tmp/pipenv-etc-requirements/pipenv-etc-hashed-reqs.txt
(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 we pip install -U pipenv==2022.8.30
and run pipenv 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
6.552 ERROR: Could not find a version that satisfies the requirement ourinternalpackage==0.1.1 (from versions: none)
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.
An error occurred while installing alembic==1.8.0; python_version >= '3.7' --hash=sha256:a2d4d90da70b30e70352cd9455e35873a255a31402a438fe24815758d7a0e5e1 --hash=sha256:b5ae4bbfc7d1302ed413989d39474d102e7cfa158f6d5969d2497955ffe85a30! Will try again.
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:
{'implementation_name': 'cpython',
'implementation_version': '3.8.14',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '5.4.0-1051-gcp',
'platform_system': 'Linux',
'platform_version': '#55~18.04.1-Ubuntu SMP Sun Aug 1 20:38:04 UTC 2021',
'python_full_version': '3.8.14',
'python_version': '3.8',
'sys_platform': 'linux'}
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’):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.8"
Contents of Pipfile.lock
(‘/code/Pipfile.lock’):
(see above for selected snippets, full output not included for reasons stated above)
Issue Analytics
- State:
- Created a year ago
- Comments:13 (2 by maintainers)
Top GitHub Comments
Confirmed success, thanks very much everyone who chipped in. (for posterity, confirmation was done by rolling back my fix above (adding
Pipfile
to theCOPY
in my Dockerfile), then installing pipenv withRUN pip install --upgrade git+https://github.com/pypa/pipenv.git@432ced65aaaa19f02d5cae4cf4c341983281c3c4#egg=pipenv
, the ref at the end of that PR there. The container built successfully and correctly installed our internal packages from our internal PyPI).Yeah, it’s up there but to confirm explicitly, adding Pipfile to the
COPY
does causesync
to succeed.