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 lock hangs

See original GitHub issue
Issue description

Run pipenv lock. Wait for an hour without visible progress

Expected result

Pipenv locks in reasonable time

Actual result

When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.

$ pipenv lock --verbose
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Locking [dev-packages] dependencies...
using sources: [{'url': 'https://pypi.org/simple', 'verify_ssl': True, 'name': 'pypi'}]
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  httpie (from -r /tmp/pipenv-zzh9cqpj-requirements/pipenv-r5vz8p2t-constraints.txt (line 2))

Finding the best candidates:
  found candidate httpie==0.9.9 (constraint was <any>)

Finding secondary dependencies:
  httpie==0.9.9             requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, httpie==0.9.9; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4", idna<2.8,>=2.5, pygments>=2.1.3, requests>=2.11.0, urllib3<1.24,>=1.21.1

New dependencies found in this round:
  adding ['certifi', '>=2017.4.17', '[]']
  adding ['chardet', '<3.1.0,>=3.0.2', '[]']
  adding ['httpie', '==0.9.9', '[]']
  adding ['idna', '<2.8,>=2.5', '[]']
  adding ['pygments', '>=2.1.3', '[]']
  adding ['requests', '>=2.11.0', '[]']
  adding ['urllib3', '<1.24,>=1.21.1', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  certifi>=2017.4.17
  chardet<3.1.0,>=3.0.2
  httpie==0.9.9 (from -r /tmp/pipenv-zzh9cqpj-requirements/pipenv-r5vz8p2t-constraints.txt (line 2))
  idna<2.8,>=2.5
  pygments>=2.1.3
  requests>=2.11.0
  urllib3<1.24,>=1.21.1

Finding the best candidates:
  found candidate certifi==2018.4.16 (constraint was >=2017.4.17)
  found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
  found candidate httpie==0.9.9 (constraint was ==0.9.9)
  found candidate idna==2.7 (constraint was >=2.5,<2.8)
  found candidate pygments==2.2.0 (constraint was >=2.1.3)
  found candidate requests==2.19.1 (constraint was >=2.11.0)
  found candidate urllib3==1.23 (constraint was >=1.21.1,<1.24)

Finding secondary dependencies:
  idna==2.7                 requires idna==2.7
  httpie==0.9.9             requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, httpie==0.9.9; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4", idna<2.8,>=2.5, pygments>=2.1.3, requests>=2.11.0, urllib3<1.24,>=1.21.1
  certifi==2018.4.16        requires -
  requests==2.19.1          requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, idna<2.8,>=2.5, requests==2.19.1; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4", urllib3<1.24,>=1.21.1
  chardet==3.0.4            requires -
  urllib3==1.23             requires urllib3==1.23; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4"
  pygments==2.2.0           requires -

New dependencies found in this round:
  adding ['idna', '<2.8,==2.7,>=2.5', '[]']
  adding ['requests', '==2.19.1,>=2.11.0', '[]']
  adding ['urllib3', '<1.24,==1.23,>=1.21.1', '[]']
Removed dependencies in this round:
  removing ['idna', '<2.8,>=2.5', '[]']
  removing ['requests', '>=2.11.0', '[]']
  removing ['urllib3', '<1.24,>=1.21.1', '[]']
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 2: not stable

                          ROUND 3                           
Current constraints:
  certifi>=2017.4.17
  chardet<3.1.0,>=3.0.2
  httpie==0.9.9 (from -r /tmp/pipenv-zzh9cqpj-requirements/pipenv-r5vz8p2t-constraints.txt (line 2))
  idna<2.8,==2.7,>=2.5
  pygments>=2.1.3
  requests==2.19.1,>=2.11.0
  urllib3<1.24,==1.23,>=1.21.1

Finding the best candidates:
  found candidate certifi==2018.4.16 (constraint was >=2017.4.17)
  found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
  found candidate httpie==0.9.9 (constraint was ==0.9.9)
  found candidate idna==2.7 (constraint was >=2.5,==2.7,<2.8)
  found candidate pygments==2.2.0 (constraint was >=2.1.3)
  found candidate requests==2.19.1 (constraint was >=2.11.0,==2.19.1)
  found candidate urllib3==1.23 (constraint was >=1.21.1,==1.23,<1.24)

Finding secondary dependencies:
  requests==2.19.1          requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, idna<2.8,>=2.5, requests==2.19.1; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4", urllib3<1.24,>=1.21.1
  httpie==0.9.9             requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, httpie==0.9.9; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4", idna<2.8,>=2.5, pygments>=2.1.3, requests>=2.11.0, urllib3<1.24,>=1.21.1
  idna==2.7                 requires idna==2.7
  pygments==2.2.0           requires -
  certifi==2018.4.16        requires -
  urllib3==1.23             requires urllib3==1.23; python_version != "3.3.*" and python_version != "3.1.*" and python_version != "3.0.*" and python_version >= "2.6" and python_version != "3.2.*" and python_version < "4"
  chardet==3.0.4            requires -
------------------------------------------------------------
Result of round 3: stable, done

Locking [packages] dependencies...
Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile). Run pipenv lock on following file:

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

[packages]
falcon = "*"
docker-compose = "*"
gunicorn = "*"
gensim = "*"

[dev-packages]
httpie = "*"

[requires]
python_version = "3.6"

Please run $ pipenv --support, and paste the results here. Don’t put backticks (`) around it! The output already contains Markdown formatting.

If you’re on macOS, run the following:

$ pipenv --support | pbcopy

If you’re on Windows, run the following:

> pipenv --support | clip

If you’re on Linux, run the following:

$ pipenv --support | xclip
$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/home/connormclaud/.pyenv/versions/3.6.6/lib/python3.6/site-packages/pipenv'

Python location: '/home/connormclaud/.pyenv/versions/3.6.6/bin/python3.6'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /home/connormclaud/.pyenv/versions/3.6.6/bin/python3.6m

  • 3.6: /home/connormclaud/.pyenv/versions/3.6.6/bin/python3.6

  • 3.6: /home/connormclaud/.pyenv/shims/python3.6

  • 3.6: /usr/bin/python3.6

  • 3.6.6: /home/connormclaud/.pyenv/versions/3.6.6/bin/python

  • 3.6.6: /home/connormclaud/.pyenv/shims/python

  • 2.7.15: /usr/bin/python

  • 2.7.15: /usr/bin/python2

  • 3.6.6: /home/connormclaud/.pyenv/versions/3.6.6/bin/python3

  • 3.6.6: /home/connormclaud/.pyenv/shims/python3

  • 3.6.5: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.6',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-29-generic',
 'platform_system': 'Linux',
 'platform_version': '#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018',
 'python_full_version': '3.6.6',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • CLUTTER_IM_MODULE
  • NVM_DIR
  • LS_COLORS
  • LC_MEASUREMENT
  • LESSCLOSE
  • LC_PAPER
  • LC_MONETARY
  • XDG_MENU_PREFIX
  • LANG
  • DISPLAY
  • PYENV_ROOT
  • OLDPWD
  • GNOME_SHELL_SESSION_MODE
  • COLORTERM
  • NVM_CD_FLAGS
  • DESKTOP_AUTOSTART_ID
  • USERNAME
  • PYENV_HOOK_PATH
  • XDG_VTNR
  • SSH_AUTH_SOCK
  • MANDATORY_PATH
  • S_COLORS
  • LC_NAME
  • XDG_SESSION_ID
  • USER
  • PYENV_DIR
  • DESKTOP_SESSION
  • QT4_IM_MODULE
  • TEXTDOMAINDIR
  • GNOME_TERMINAL_SCREEN
  • DEFAULTS_PATH
  • PWD
  • HOME
  • TEXTDOMAIN
  • SSH_AGENT_PID
  • PYENV_VERSION
  • QT_ACCESSIBILITY
  • XDG_SESSION_TYPE
  • XDG_DATA_DIRS
  • XDG_SESSION_DESKTOP
  • LC_ADDRESS
  • LC_NUMERIC
  • GTK_MODULES
  • WINDOWPATH
  • VTE_VERSION
  • SHELL
  • TERM
  • QT_IM_MODULE
  • XMODIFIERS
  • IM_CONFIG_PHASE
  • NVM_BIN
  • XDG_CURRENT_DESKTOP
  • GPG_AGENT_INFO
  • GNOME_TERMINAL_SERVICE
  • SHLVL
  • XDG_SEAT
  • PYENV_SHELL
  • 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–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/connormclaud/.pyenv/versions/3.6.6/bin:/home/connormclaud/.pyenv/libexec:/home/connormclaud/.pyenv/plugins/python-build/bin:/home/connormclaud/.nvm/versions/node/v10.5.0/bin:/home/connormclaud/.pyenv/shims:/home/connormclaud/.pyenv/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/connormclaud/PycharmProjects/vectorizer

Contents of Pipfile (‘/home/connormclaud/PycharmProjects/vectorizer/Pipfile’):

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

[packages]
falcon = "*"
docker-compose = "*"
gunicorn = "*"
gensim = "*"

[dev-packages]
httpie = "*"

[requires]
python_version = "3.6"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:43 (8 by maintainers)

github_iconTop GitHub Comments

99reactions
P0oOOOo0YAcommented, Dec 24, 2018

It’s crazy it took almost 20 minutes to create the lock file and there was no sign of activity from the command line. At least you can provide a progress bar with an ETA to notify the user something is going on at background.

Generating Pipfile.lock
Locking ... dependecy [=====---------------] 25% ETA: 10m 54s
29reactions
techalchemycommented, Nov 7, 2018

Please do not ever run pipenv with sudo, you will now need to sudo chown -R youruser:yourgroup ~/.cache/pipenv or wherever your cache directory is located. We really can’t provide support if you do this kind of thing

Do note that “hangs” is not a descriptive or actionable bug report. You will need to provide actual data, including runtime, network traffic, cpu usage of the process, etc, if you want us to act on your report. If you can’t or won’t provide that information, we can’t help you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv stuck " Locking..." - python - Stack Overflow
$ pipenv lock is used to create a Pipfile.lock, which declares all dependencies (and sub-dependencies) of your project, their latest available ...
Read more >
pipenv lock hangs. It really does. · Issue #3827 - GitHub
pipenv lock downloads every available artifact of installed packages and their dependencies. It does this to calculate their hashes, even when ...
Read more >
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
Run pipenv lock --clear and try again. The lock sequence caches results to speed up subsequent runs.
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . There are some known issues with using...
Read more >

github_iconTop Related Medium Post

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