Skip to content

pipenv lock fails when Pipfile points to setup.py with VCS dependency #3576

@dmder

Description

@dmder

Issue description

pipenv lock fails when Pipfile contains {editable = true, path = "."} and setup.py contains VCS dependency. pipenv install --skip-lock completes without any issues. I've tried pipenv lock --clear and removed pip local cache with no luck, the same error occurs.

At the same time when I push package1 into the git repo and then add it into a new Pipfile in a fresh pipenv environment, pipenv install succeeds even without --skip-lock. So I suspect pipenv doesn't play well together with setup.py and VCS dependencies for some reason.

If I remember correctly, I've had some similar issues before and solved them by using PIP_PROCESS_DEPENDENCY_LINKS=1 env variable, but newer versions of pip do not support this anymore.

Project setup:

  • Pipfile:
[packages]
package1 = {editable = true, path = "."}
  • setup.py:
setup(name='package1',
      ...
      install_requires=[
          ...
          'package2 @ git+ssh://git@gitlab.com/.../package2.git@v0.0.2#egg=package2'
      ]
      )

Expected result

Pipfile.lock is generated.

Actual result

I'm getting the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 85, in _main
    requirements_dir=requirements_dir,
  File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 69, in resolve
    req_dir=requirements_dir
  File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 726, in resolve_deps
    req_dir=req_dir,
  File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 395, in resolve
    raise ResolutionFailure(message=str(e))
pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches package2@ git+ssh://git@gitlab.com/.../package2.git@v0.0.2#egg=package2 from git+ssh://git@gitlab.com/.../package2.git@v0.0.2#egg=package2
No versions found
Was https://pypi.org/simple reachable?

Steps to replicate

Not sure whether it's common issue with VCS dependencies or just this case.


$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/usr/local/lib/python3.6/site-packages/pipenv'

Python location: '/usr/local/opt/python/bin/python3.6'

Python installations found:

  • 3.6.5: /usr/local/bin/python3
  • 3.6.5: /usr/local/bin/python3.6m
  • 2.7.15: /usr/local/bin/python
  • 2.7.15: /usr/local/bin/pythonw
  • 2.7.10: /usr/bin/python
  • 2.7.10: /usr/bin/pythonw
  • 2.7.10: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.7.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT '
                     '2018; root:xnu-4570.71.2~1/RELEASE_X86_64',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

  • Apple_PubSub_Socket_Render
  • HOME
  • LANG
  • LC_ALL
  • LC_CTYPE
  • LOGNAME
  • NPM_CONFIG_PREFIX
  • PATH
  • PWD
  • SECURITYSESSIONID
  • SHELL
  • SHLVL
  • SSH_AUTH_SOCK
  • TERM
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • TMPDIR
  • USER
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/dmitryd/.poetry/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/dmitryd/.npm-global/bin:/Users/dmitryd/Library/Python/3.6/bin:/usr/local/bin:/usr/local/sbin
  • SHELL: /usr/local/bin/fish
  • LANG: en_GB.UTF-8
  • PWD: /.../python-packages/package1

Contents of Pipfile ('/.../package1/Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
package1 = {editable = true, path = "."}

[dev-packages]
pytest = "*"
pytest-env = "*"
pytest-cov = "*"
pytest-mock = "*"
pylint = "*"
moto = ">=1.3.6, !=1.3.7"

[requires]
python_version = "3.6"

Metadata

Metadata

Assignees

Labels

Category: VCSRelates to version control system dependencies.Type: Bug 🐛This issue is a bug.Type: DuplicateThis issue is a duplicate of an already-existing issue.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions