pipenv fails to lock on first installed package

Created on 3 Jul 2018  路  3Comments  路  Source: pypa/pipenv

Issue description

Running $ pipenv install black in a new directory fails dependency resolution.

Expected result

Pipfile.lock is generated.

Actual result
$ pipenv install black
Creating a virtualenv for this project...
Pipfile: /private/tmp/black-test/Pipfile
Using /usr/local/Cellar/pipenv/2018.7.1/libexec/bin/python3.7 (3.7.0) to create virtualenv...
鉅婣lready using interpreter /usr/local/Cellar/pipenv/2018.7.1/libexec/bin/python3.7
Using real prefix '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/Browning/.local/share/virtualenvs/black-test-pUOSGLqX/bin/python3.7
Also creating executable in /Users/Browning/.local/share/virtualenvs/black-test-pUOSGLqX/bin/python
Installing setuptools, pip, wheel...done.
Setting project for black-test-pUOSGLqX to /private/tmp/black-test

Virtualenv location: /Users/Browning/.local/share/virtualenvs/black-test-pUOSGLqX
Creating a Pipfile for this project...
Installing black...
Collecting black
  Downloading https://files.pythonhosted.org/packages/4e/b5/575cdaabf1f98ebe50c0ee85b202fcce3b8df1f21d6ed02708bc539674c3/black-18.6b4-py36-none-any.whl (81kB)
Collecting attrs>=17.4.0 (from black)
  Downloading https://files.pythonhosted.org/packages/41/59/cedf87e91ed541be7957c501a92102f9cc6363c623a7666d69d51c78ac5b/attrs-18.1.0-py2.py3-none-any.whl
Collecting click>=6.5 (from black)
  Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
Collecting appdirs (from black)
  Downloading https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting toml>=0.9.4 (from black)
  Downloading https://files.pythonhosted.org/packages/f5/f9/044110c267e6408013b85166a7cfcd352cf85275aa8ce700aa5c0eb407ba/toml-0.9.4.tar.gz
Building wheels for collected packages: toml
  Running setup.py bdist_wheel for toml: started
  Running setup.py bdist_wheel for toml: finished with status 'done'
  Stored in directory: /Users/Browning/Library/Caches/pipenv/wheels/60/a0/8a/eaebd461aa0abf3d38546b12f3b3234de0a39de13374dad39e
Successfully built toml
Installing collected packages: attrs, click, appdirs, toml, black
Successfully installed appdirs-1.4.3 attrs-18.1.0 black-18.6b4 click-6.7 toml-0.9.4

Adding black to Pipfile's [packages]...
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 black (from -r /var/folders/h1/2b6gts3x37zcnj5khyv8y5180000gn/T/pipenv-ulhlkj9d-requirements/pipenv-cgon37qk-constraints.txt (line 2))
Skipped pre-versions: 18.3a0, 18.3a0, 18.3a1, 18.3a1, 18.3a2, 18.3a2, 18.3a3, 18.3a3, 18.3a4, 18.3a4, 18.4a0, 18.4a0, 18.4a1, 18.4a1, 18.4a2, 18.4a2, 18.4a3, 18.4a3, 18.4a4, 18.4a4, 18.5b0, 18.5b0, 18.5b1, 18.5b1, 18.6b0, 18.6b0, 18.6b1, 18.6b1, 18.6b2, 18.6b2, 18.6b3, 18.6b3, 18.6b4, 18.6b4
There are incompatible versions in the resolved dependencies.
Theories

I suspect this has something to do with pipenv installing a beta version.


$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2018.7.1/libexec/bin/python3.7'

Other Python installations in PATH:

  • 2.7: /Users/Browning/.pyenv/shims/python2.7
  • 2.7: /Users/Browning/.pyenv/shims/python2.7
  • 2.7: /usr/bin/python2.7
  • 3.6: /Users/Browning/.pyenv/shims/python3.6m
  • 3.6: /Users/Browning/.pyenv/shims/python3.6
  • 3.7: /usr/local/bin/python3.7m
  • 3.7: /Users/Browning/.pyenv/shims/python3.7
  • 3.7: /usr/local/bin/python3.7

  • 3.6.4: /Users/Browning/.pyenv/shims/python

  • 2.7.10: /usr/bin/python
  • 2.7.13: /Users/Browning/.pyenv/shims/python2
  • 3.6.4: /Users/Browning/.pyenv/shims/python3
  • 3.7.0: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.6.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.6.0: Tue May  8 15:22:16 PDT '
                     '2018; root:xnu-4570.61.1~1/RELEASE_X86_64',
 'python_full_version': '3.7.0',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • _Z_NO_RESOLVE_SYMLINKS
  • NODENV_SHELL
  • TERM_PROGRAM
  • ANDROID_HOME
  • TERM
  • SHELL
  • TMPDIR
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • ZSH
  • USER
  • SSH_AUTH_SOCK
  • __CF_USER_TEXT_ENCODING
  • PAGER
  • LSCOLORS
  • _
  • PWD
  • JAVA_HOME
  • EDITOR
  • LANG
  • ITERM_PROFILE
  • XPC_FLAGS
  • RBENV_SHELL
  • XPC_SERVICE_NAME
  • PYENV_SHELL
  • SHLVL
  • HOME
  • COLORFGBG
  • ITERM_SESSION_ID
  • LESS
  • LOGNAME
  • LC_CTYPE
  • DISPLAY
  • COLORTERM
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv鈥搒pecific environment variables:

Debug鈥搒pecific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2018.7.1/libexec/tools:/Users/Browning/.nodenv/shims:/Users/Browning/.pyenv/shims:/Users/Browning/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/usr/local/sbin
  • SHELL: /bin/zsh
  • EDITOR: vim
  • LANG: en_US.UTF-8
  • PWD: /tmp/black-test

Contents of Pipfile ('/private/tmp/black-test/Pipfile'):

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

[packages]
black = "*"

[dev-packages]

[requires]
python_version = "3.7"

Most helpful comment

Hint: try $ pipenv lock --pre if it is a pre-release dependency.

Try --pre

All 3 comments

Hint: try $ pipenv lock --pre if it is a pre-release dependency.

Try --pre

Why this happen to black?

@wy193777 See https://github.com/psf/black/issues/517 for why black has a non-semver compatible release that requires us to use --pre flag in pipenv.

Was this page helpful?
0 / 5 - 0 ratings