Pipenv: "Incompatible versions in the resolved dependencies" when dependency is mentioned in Pipfile

Created on 31 Aug 2018  路  2Comments  路  Source: pypa/pipenv

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.

If you're requesting a new feature or leaving feedback, please use this forum instead:

https://kenneth-reitz.uservoice.com/forums/913660-general

Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.

Make sure to mention your debugging experience if the documented solution failed.

Issue description

When a dependency is explicitly mentioned in the Pipfile with an arbitrary version and a second dependency mentioned in the Pipfile depends on that package requiring not the newest version, trying to install the dependencies results in "Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies." If I remove the first package, everything works just fine as it is still a subdependency of the other package.

Expected result

Pipenv should automatically find a version of the mentioned package that fulfills the requirements of the second package. Even though removing the package from the Pipfile solves the problem, when working on projects it should be possible to mention the packages in the Pipfile without breaking the project. Sometimes it is not possible to have a overview about the subdependecies of all packages and if a certain package will be installed or not.

Actual result

$ pipenv install
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches numpy<=1.14.5,==1.15.1,>=1.13.3 (from -r /tmp/pipenv-jemw6uc_-requirements/pipenv-x7vwdbdf-constraints.txt (line 2))
Tried: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.5.1, 1.6.0, 1.6.0, 1.6.0, 1.6.0, 1.6.0, 1.6.0, 1.6.0, 1.6.1, 1.6.1, 1.6.1, 1.6.1, 1.6.1, 1.6.1, 1.6.1, 1.6.2, 1.6.2, 1.6.2, 1.6.2, 1.6.2, 1.6.2, 1.6.2, 1.7.0, 1.7.0, 1.7.0, 1.7.0, 1.7.0, 1.7.0, 1.7.0, 1.7.0, 1.7.1, 1.7.1, 1.7.1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.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.10.4, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.0, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.1, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.2, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.11.3, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.0, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.12.1, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.0, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.1, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.13.3, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.0, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.1, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.2, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.3, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.4, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.14.5, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.0, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1, 1.15.1
Skipped pre-versions: 1.11.0b3, 1.11.0b3, 1.11.0b3, 1.11.0b3, 1.11.0b3, 1.11.0b3, 1.11.0rc1, 1.11.0rc1, 1.11.0rc1, 1.11.0rc1, 1.11.0rc1, 1.11.0rc1, 1.11.0rc2, 1.11.0rc2, 1.11.0rc2, 1.11.0rc2, 1.11.0rc2, 1.11.0rc2, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.1rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.11.2rc1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0b1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc1, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.0rc2, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1rc1, 1.12.1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 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2, 1.15.0rc2
There are incompatible versions in the resolved dependencies.

Steps to replicate

Pipfile:

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

[packages]
numpy = "*"
tensorflow = "*"

[dev-packages]

[requires]
python_version = "3.5"

$ pipenv --support

Pipenv version: '2018.7.1'

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

Python location: '/usr/bin/python3'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7
  • 2.7: /usr/bin/python2.7
  • 3.5: /home/christoph/.pyenv/shims/python3.5
  • 3.6: /usr/bin/python3.6m
  • 3.6: /usr/bin/python3.6
  • 3.7: /usr/bin/python3.7m
  • 3.7: /usr/bin/python3.7

  • 2.7.15: /home/christoph/.pyenv/shims/python

  • 2.7.15: /usr/bin/python
  • 2.7.15: /usr/bin/python2
  • 3.6.5: /home/christoph/.pyenv/shims/python3
  • 3.6.5: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-33-generic',
 'platform_system': 'Linux',
 'platform_version': '#36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • CLUTTER_IM_MODULE
  • LD_LIBRARY_PATH
  • LS_COLORS
  • LC_MEASUREMENT
  • LESSCLOSE
  • LC_PAPER
  • LC_MONETARY
  • XDG_MENU_PREFIX
  • LANG
  • MANAGERPID
  • DISPLAY
  • PYENV_ROOT
  • INVOCATION_ID
  • GNOME_SHELL_SESSION_MODE
  • COLORTERM
  • USERNAME
  • XDG_VTNR
  • SSH_AUTH_SOCK
  • MANDATORY_PATH
  • LC_NAME
  • XDG_SESSION_ID
  • USER
  • DESKTOP_SESSION
  • QT4_IM_MODULE
  • TEXTDOMAINDIR
  • GNOME_TERMINAL_SCREEN
  • DEFAULTS_PATH
  • PWD
  • HOME
  • JOURNAL_STREAM
  • TEXTDOMAIN
  • SSH_AGENT_PID
  • QT_ACCESSIBILITY
  • XDG_SESSION_TYPE
  • XDG_DATA_DIRS
  • XDG_SESSION_DESKTOP
  • LC_ADDRESS
  • DBUS_STARTER_ADDRESS
  • LC_NUMERIC
  • GTK_MODULES
  • WINDOWPATH
  • TERM
  • VTE_VERSION
  • SHELL
  • QT_IM_MODULE
  • XMODIFIERS
  • IM_CONFIG_PHASE
  • DBUS_STARTER_BUS_TYPE
  • XDG_CURRENT_DESKTOP
  • GPG_AGENT_INFO
  • GNOME_TERMINAL_SERVICE
  • PYENV_SHELL
  • SHLVL
  • XDG_SEAT
  • LC_TELEPHONE
  • GDMSESSION
  • GNOME_DESKTOP_SESSION_ID
  • LOGNAME
  • DBUS_SESSION_BUS_ADDRESS
  • XDG_RUNTIME_DIR
  • XAUTHORITY
  • XDG_CONFIG_DIRS
  • PATH
  • LC_IDENTIFICATION
  • SESSION_MANAGER
  • LESSOPEN
  • GTK_IM_MODULE
  • LC_TIME
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv鈥搒pecific environment variables:

Debug鈥搒pecific environment variables:

  • PATH: /home/christoph/.pyenv/shims:/home/christoph/.pyenv/bin:/home/christoph/.local/bin:/usr/local/cuda-9.0/bin:/home/christoph/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /home/christoph/Code/Python/pipenv-test

Contents of Pipfile ('/home/christoph/Code/Python/pipenv-test/Pipfile'):

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

[packages]
numpy = "*"
tensorflow = "*"

[dev-packages]

[requires]
python_version = "3.5"

Dependency Resolution

All 2 comments

I have the same issue. The behaviour of pipenv is weird.

pipenv install tensorflow --python 3.6.5

works. But when I install numpy afterwards I get

pipenv install numpy

Installing numpy...
Requirement already satisfied: numpy in ./.venv/lib/python3.6/site-packages (1.14.5)
...
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
...
Could not find a version that matches numpy<=1.14.5,==1.15.1,>=1.13.3 (from -r /var/folders/2s/crh_6sqj3dv0x4c0kcmd5m_4b5l218/T/pipenv-n0subtew-requirements/pipenv-5ltznujm-constraints.txt (line 3))
...
There are incompatible versions in the resolved dependencies.

So pipenv notices that numpy has already been installed, but still thinks it cannot fulfil the requirements.

We have found this too for some users and the fix was to clear the pipenv and pip caches in %localappdata%:

In our case, the error was:

Could not find a version that matches idna<2.7,<2.8,==2.7,>=2.1,>=2.5
Tried: 2.6, 2.7
There are incompatible versions in the resolved dependencies.

Was this page helpful?
0 / 5 - 0 ratings