question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipenv does not lock dependencies of installed wheels

See original GitHub issue

When installing a dependency through a wheel (using either https:// or file://), the initial installation will work fine and install all the library’s dependencies into your virtual env. Running pipenv graph will show the dependency tree correctly. The resulting Pipenv.lock file though, will not have the child dependencies of the wheel (even after running pipenv lock again).

I created a repo that shows the error happening in one script: https://github.com/TotempaaltJ/minimal-pipenv-wheel-fail. If you clone it and run test.sh it’ll run through the steps, executing them as it goes, to show that it fails to import the dependency after installing straight from a Pipenv.lock file.

$ python -m pipenv.help output

Pipenv version: '11.9.0'

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

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

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /usr/local/bin/python3.6m

  • 3.6: /usr/local/bin/python3.6

  • 2.7.10: /usr/bin/python

  • 3.6.4: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.4',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.4.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST '
                     '2017; root:xnu-4570.41.2~1/RELEASE_X86_64',
 'python_full_version': '3.6.4',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

  • LC_ALL
  • LANG
  • XPC_FLAGS
  • TERM_SESSION_ID
  • EDITOR
  • GPG_TTY
  • COLORTERM
  • __CF_USER_TEXT_ENCODING
  • ITERM_SESSION_ID
  • SSH_AUTH_SOCK
  • USER
  • PROMPT_DIRTRIM
  • PWD
  • HOME
  • LC_CTYPE
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • Apple_PubSub_Socket_Render
  • ITERM_PROFILE
  • TMPDIR
  • XPC_SERVICE_NAME
  • TERM
  • SHELL
  • SHLVL
  • COLORFGBG
  • PROMPT_COMMAND
  • LOGNAME
  • PATH
  • PS1
  • OLDPWD
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH
  • PYTHONUNBUFFERED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/martijn/.cargo/bin:/Users/martijn/.local/bin:~/workspace/docker/bin:/Users/martijn/bin:/Users/martijn/.local/bin:/home/martijn/.gem/ruby/2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/martijn/.fzf/bin
  • SHELL: /usr/local/Cellar/bash/4.4.18/bin/bash
  • EDITOR: nvim
  • LANG: en_US
  • PWD: /Users/martijn/Projects/lib/minimal-pipenv-fail/example

Contents of Pipfile (‘/Users/martijn/Projects/lib/minimal-pipenv-fail/example/Pipfile’):

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

[packages]
"7abf3e1" = {file = "file:///Users/martijn/Projects/lib/minimal-pipenv-fail/dependency/dist/test_dep-1.0-py3-none-any.whl"}

[dev-packages]

[requires]
python_version = "3.6"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Apr 11, 2018

@TotempaaltJ installing the wheel is fine, and works fine, and installing its dependencies also works fine, but resolving those dependencies is tricky.

1reaction
uranusjrcommented, Apr 10, 2018

@TotempaaltJ In that case it’s usually recommended to upload it to an index server—pypi.org if possible, or a private one If making the package public isn’t an option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Pipenv Errors and How to Solve Them: Why Won't it ...
The second most common reason locking fails is that we attempt to install a package that is a pre-release version. You can resolve...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
☤ An exception is raised during Locking dependencies… ¶ ... Run pipenv lock --clear and try again. The lock sequence caches results to...
Read more >
pipenv Documentation - Read the Docs
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock. • There are some known issues with using...
Read more >
Pipenv stuck " Locking..." - python - Stack Overflow
However, there are times when it is not just a slow/large install, but is instead an issue with your Pipfile[.lock] . If you're...
Read more >
Release and Version History — pipenv 2022.12.20.dev0 ...
Fix for requirementslib hanging during install of remote wheels files. ... the Pipfile.lock no longer contained the extra dependencies that should have been ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found