<p>pipenvが最初にインストールされたパッケージのロックに失敗する</p>

作成日 2018年07月03日  ·  3コメント  ·  ソース: pypa/pipenv

問題の説明

新しいディレクトリで$ pipenv install blackを実行すると、依存関係の解決に失敗します。

期待される結果

Pipfile.lockが生成されます。

実結果
$ 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...
⠋Already 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.
理論

これは、ベータ版のインストールにpipenvが関係しているのではないかと思います。


$ pipenv --support

Pipenvバージョン: '2018.7.1'

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

Pythonの場所: '/usr/local/Cellar/pipenv/2018.7.1/libexec/bin/python3.7'

PATH他のPythonインストール:

  • 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情報:

{'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'}

システム環境変数:

  • 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固有の環境変数:

デバッグ固有の環境変数:

  • 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
  • EDITORvim
  • LANGen_US.UTF-8
  • PWD/tmp/black-test

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"

最も参考になるコメント

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

--pre試しください

全てのコメント3件

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

--pre試しください

なぜこれが黒くなるのですか?

@ wy193777 blackにsemverと互換性のないリリースがあり、 pipenv --preフラグを使用する必要がある理由については、 https: //github.com/psf/black/issues/517を参照してください pipenv

このページは役に立ちましたか?
0 / 5 - 0 評価