Skip to content
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

ResolutionFailure for VCS URL in install_requires #3477

Closed
NathanUrwin opened this issue Jan 24, 2019 · 2 comments · Fixed by #3298
Closed

ResolutionFailure for VCS URL in install_requires #3477

NathanUrwin opened this issue Jan 24, 2019 · 2 comments · Fixed by #3298
Assignees
Labels
Category: Dependency Resolution Issue relates to dependency resolution. Type: Duplicate This issue is a duplicate of an already-existing issue.

Comments

@NathanUrwin
Copy link

Issue description

Installing a package that has a VCS URL in it's setup.py::setup(install_requires=[ ... ]) throws an ERROR.

Expected result

The same result as pip install -e .

$ pipenv run pip install -e .
Creating a virtualenv for this project…
Pipfile: /Users/nathan.urwin/Projects/wharf_group/wharfMQ/Pipfile
Using /usr/local/opt/pyenv/versions/3.7.1/bin/python3 (3.7.1) to create virtualenv…
⠹ Creating virtual environment...Using base prefix '/usr/local/opt/pyenv/versions/3.7.1'
New python executable in /Users/nathan.urwin/.local/share/virtualenvs/wharfMQ-KWi3mm3b/bin/python3
Also creating executable in /Users/nathan.urwin/.local/share/virtualenvs/wharfMQ-KWi3mm3b/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /usr/local/opt/pyenv/versions/3.7.1/bin/python3

✔ Successfully created virtual environment! 
Virtualenv location: /Users/nathan.urwin/.local/share/virtualenvs/wharfMQ-KWi3mm3b
Obtaining file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ
Collecting pika (from wharfmq==0.1.0)
  Using cached https://files.pythonhosted.org/packages/5e/8a/1a805c24c024d7715b006d1089e3552559f6752fe5399151746b880fab69/pika-0.13.0-py2.py3-none-any.whl
Collecting py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log (from wharfmq==0.1.0)
  Cloning https://github.com/nathanurwin/py2log.git to /private/var/folders/fp/l_2c1vp93vq6qd2mbzn9r8240000gp/T/pip-install-tmqrm7lt/py2log
Building wheels for collected packages: py2log
  Building wheel for py2log (setup.py) ... done
  Stored in directory: /private/var/folders/fp/l_2c1vp93vq6qd2mbzn9r8240000gp/T/pip-ephem-wheel-cache-y0bl5slt/wheels/45/80/21/382ceaa50d3b3731d06ff3194c825bb718268dbbdde67b7aab
Successfully built py2log
Installing collected packages: pika, py2log, wharfmq
  Running setup.py develop for wharfmq
Successfully installed pika-0.13.0 py2log-0.1.0 wharfmq

Actual result

$ pipenv --verbose install -e . 
Creating a Pipfile for this project…
Installing -e .…
⠋ Installing...Installing 'wharfmq'
$ ['/Users/nathan.urwin/.local/share/virtualenvs/wharfMQ-KWi3mm3b/bin/pip', 'install', '--verbose', '--upgrade', '-e', '.', '-i', 'https://pypi.org/simple']
Adding wharfmq to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed! 
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ (from -r /var/folders/fp/l_2c1vp93vq6qd2mbzn9r8240000gp/T/pipenv_fr5tydtrequirements/pipenv-5rnt12c2-constraints.txt (line 2))

Finding the best candidates:
  found candidate -e file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ (constraint was <any>)

Finding secondary dependencies:

New dependencies found in this round:
  adding ['pika', '', '[]']
  adding ['py2log', '', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  pika
  py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log
  wharfmq==0.1.0 from file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ (from -r /var/folders/fp/l_2c1vp93vq6qd2mbzn9r8240000gp/T/pipenv_fr5tydtrequirements/pipenv-5rnt12c2-constraints.txt (line 2))

Finding the best candidates:
  found candidate pika==0.13.0 (constraint was <any>)
Traceback (most recent call last):
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/utils.py", line 385, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 198, in _resolve_one_round
    best_matches = {self.get_best_match(ireq) for ireq in constraints}
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 198, in <setcomp>
    best_matches = {self.get_best_match(ireq) for ireq in constraints}
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 263, in get_best_match
    best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 175, in find_best_match
    raise NoCandidateFound(ireq, all_candidates, self.finder)
pipenv.patched.piptools.exceptions.NoCandidateFound: Could not find a version that matches py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log
No versions found
Was https://pypi.org/simple reachable?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 85, in _main
    requirements_dir=requirements_dir,
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 69, in resolve
    req_dir=requirements_dir
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/utils.py", line 726, in resolve_deps
    req_dir=req_dir,
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/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 py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log
No versions found
Was https://pypi.org/simple reachable?
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ (from -r /var/folders/fp/l_2c1vp93vq6qd2mbzn9r8240000gp/T/pipenv_fr5tydtrequirements/pipenv-5rnt12c2-constraints.txt (line 2))

Finding the best candidates:
  found candidate -e file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ (constraint was <any>)

Finding secondary dependencies:

New dependencies found in this round:
  adding ['pika', '', '[]']
  adding ['py2log', '', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  pika
  py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log
  wharfmq==0.1.0 from file:///Users/nathan.urwin/Projects/wharf_group/wharfMQ (from -r /var/folders/fp/l_2c1vp93vq6qd2mbzn9r8240000gp/T/pipenv_fr5tydtrequirements/pipenv-5rnt12c2-constraints.txt (line 2))

Finding the best candidates:
  found candidate pika==0.13.0 (constraint was <any>)
Traceback (most recent call last):
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/utils.py", line 385, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 198, in _resolve_one_round
    best_matches = {self.get_best_match(ireq) for ireq in constraints}
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 198, in <setcomp>
    best_matches = {self.get_best_match(ireq) for ireq in constraints}
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/resolver.py", line 263, in get_best_match
    best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 175, in find_best_match
    raise NoCandidateFound(ireq, all_candidates, self.finder)
pipenv.patched.piptools.exceptions.NoCandidateFound: Could not find a version that matches py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log
No versions found
Was https://pypi.org/simple reachable?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 85, in _main
    requirements_dir=requirements_dir,
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/resolver.py", line 69, in resolve
    req_dir=requirements_dir
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/utils.py", line 726, in resolve_deps
    req_dir=req_dir,
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/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 py2log@ git+https://github.com/nathanurwin/py2log.git#egg=py2log from git+https://github.com/nathanurwin/py2log.git#egg=py2log
No versions found
Was https://pypi.org/simple reachable?

Steps to replicate

$ cd path/to/sandbox
$ mkdir -p wharfmq/src/wharfmq
$ touch wharfmq/setup.py
$ touch wharfmq/src/wharfmq/__init__.py

setup.py:

from setuptools import setup, find_packages

setup(
    name="wharfmq",
    version="0.1.0",
    packages=find_packages(where="src"),
    package_dir={"": "src"},
    install_requires=["pika", "py2log @ git+https://github.com/nathanurwin/py2log.git#egg=py2log"]
)

Run pipenv install -e .


$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/usr/local/opt/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv'

Python location: '/usr/local/opt/pyenv/versions/3.7.1/bin/python3.7'

Python installations found:

  • 3.7.1: /usr/local/opt/pyenv/versions/3.7.1/bin/python3
  • 3.7.1: /usr/local/opt/pyenv/versions/3.7.1/bin/python3.7m
  • 2.7.15: /usr/local/opt/pyenv/versions/2.7.15/bin/python
  • 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.7.1',
 '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: Fri Nov  2 20:43:16 PDT '
                     '2018; root:xnu-4570.71.17~1/RELEASE_X86_64',
 'python_full_version': '3.7.1',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_PROGRAM
  • NVM_CD_FLAGS
  • PYENV_ROOT
  • TERM
  • SHELL
  • TMPDIR
  • Apple_PubSub_Socket_Render
  • CODE_BIN
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • PYENV_VERSION
  • USER
  • NVM_DIR
  • REQUESTS_CA_BUNDLE
  • SSH_AUTH_SOCK
  • PYENV_DIR
  • PATH
  • PWD
  • JAVA_HOME
  • LANG
  • PYENV_HOOK_PATH
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • RUBY_DIR
  • HOME
  • SHLVL
  • PYENV_SHELL
  • RUBY_GEMDIR
  • LOGNAME
  • NVM_BIN
  • __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: /usr/local/opt/pyenv/versions/3.7.1/bin:/usr/local/Cellar/pyenv/1.2.8_1/libexec:/usr/local/opt/pyenv/plugins/python-build/bin:/Users/nathan.urwin/.jabba/jdk/zulu@1.8.121/Contents/Home/bin:/usr/local/opt/pyenv/shims:/usr/local/opt/pyenv/bin:/usr/local/opt/nvm/versions/node/v10.13.0/bin:/usr/local/lib/ruby/gems/2.5.0/bin:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /Users/nathan.urwin/Projects/wharf_group/wharfMQ

Contents of Pipfile ('/Users/nathan.urwin/Projects/wharf_group/wharfMQ/Pipfile'):

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

[dev-packages]

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

[requires]
python_version = "3.7"
@NathanUrwin NathanUrwin changed the title ResolutionFailure for VSC URL in install_requires ResolutionFailure for VCS URL in install_requires Jan 24, 2019
@techalchemy
Copy link
Member

I have been working on this feature since early november, and it has spanned 3 libraries and several months of breaking changes. Note that this is a duplicate of #3148 and #3576 -- and is resolved by #3298 which will be merged tonight

Thanks for the report and sorry for the trouble!

@techalchemy techalchemy self-assigned this Mar 5, 2019
@techalchemy techalchemy added Type: Duplicate This issue is a duplicate of an already-existing issue. Category: Dependency Resolution Issue relates to dependency resolution. labels Mar 5, 2019
@techalchemy techalchemy added this to the March Release milestone Mar 5, 2019
@glinskyc
Copy link

glinskyc commented Jun 16, 2019

I installed the current master branch to use this feature, i.e. installing a package that has a VCS dependency in setup.py install_requires, but it does not appear to work.

To clarify, upon installing said package, the resulting Pipfile.lock does not contain the VCS dependency and its sub-dependencies, despite that they do get installed in the current environment. This also means if I run pipenv lock -r > requirements.txt, the VCS dependency and its sub-dependencies are not being included, but I would expect them to be.

Maybe this is already known and I am too early in trying, but I wanted to relay my attempt regardless. Any idea when we can expect the next release, which I presume will include this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Dependency Resolution Issue relates to dependency resolution. Type: Duplicate This issue is a duplicate of an already-existing issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants