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.

Locking is slow (and performs redundant downloads)

See original GitHub issue

Is this an issue with my installation? It happens on all of my machines… Is there anything I/we can do to speed it up?

I install one package and the locking seems to take minutes.

Locking [packages] dependencies…
$ python -m pipenv.help output

Pipenv version: '2018.05.18'

Pipenv location: '/Users/colllin/miniconda3/lib/python3.6/site-packages/pipenv'

Python location: '/Users/colllin/miniconda3/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6m

  • 3.6: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6

  • 3.6: /Users/colllin/miniconda3/bin/python3.6

  • 3.6: /Users/colllin/.pyenv/shims/python3.6

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

  • 3.6.3: /Users/colllin/miniconda3/bin/python

  • 3.6.3: /Users/colllin/.pyenv/shims/python

  • 2.7.10: /usr/bin/python

  • 3.6.4: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3

  • 3.6.3: /Users/colllin/miniconda3/bin/python3

  • 3.6.4: /Users/colllin/.pyenv/shims/python3

  • 3.6.4: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.5.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST '
                     '2018; root:xnu-4570.51.1~1/RELEASE_X86_64',
 'python_full_version': '3.6.3',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_PROGRAM
  • NVM_CD_FLAGS
  • TERM
  • SHELL
  • TMPDIR
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • NVM_DIR
  • USER
  • SSH_AUTH_SOCK
  • PYENV_VIRTUALENV_INIT
  • PATH
  • PWD
  • LANG
  • XPC_FLAGS
  • PS1
  • XPC_SERVICE_NAME
  • PYENV_SHELL
  • HOME
  • SHLVL
  • DRAM_ROOT
  • LOGNAME
  • NVM_BIN
  • SECURITYSESSIONID
  • _
  • __CF_USER_TEXT_ENCODING
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/colllin/miniconda3/bin:/Users/colllin/.pyenv/plugins/pyenv-virtualenv/shims:/Users/colllin/.pyenv/shims:/Users/colllin/.pyenv/bin:/Users/colllin/.nvm/versions/node/v8.1.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /Users/.../folder

Contents of Pipfile (‘/Users/…/Pipfile’):

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

[packages]
gym-retro = "*"

[dev-packages]

[requires]
python_version = "3.6"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:105
  • Comments:76 (14 by maintainers)

github_iconTop GitHub Comments

95reactions
ushuzcommented, Aug 30, 2018

I noticed that lock was really slow and downloaded huge amount of data from files.pythonhosted.org, more than 800MB for a small project that depends on scipy flask etc.

So I sniffed the requests made to files.pythonhosted.org, and it turns out that pip or pipenv were doing completely unnecessary downloads, which makes lock painfully slow.

1535625096148

For example, same version numpy had been downloaded several times in full. And it downloaded wheels for windows / linux, although I was using a Mac.

My setup:

$ pipenv --version
pipenv, version 2018.05.18

$ pip -V
pip 18.0 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
50reactions
vamseekmcommented, Oct 30, 2018

this is pretty bad to the point I am afraid to install new python libs or upgrade existing ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

System stops responding, slow file server performance, or ...
To restart the Server services, follow these steps: Click Start, and then click Run. In the Open box, type cmd, and then click...
Read more >
Comparing Lock-Step, redundant execution & Split-Lock
This lock stepping is fixed in the silicon by design and therefore has no flexibility, so the application is effectively using two cores...
Read more >
Chapter 17. File and Record Locking - Samba.org
There are two types of locking that need to be performed by an SMB server. The first is record locking that allows a...
Read more >
Session lock causes ASP.Net websites to be slow
The ASP.Net session lock forces the new page request to wait until the original request has finished its painfully slow load. Arrrgh. Anytime...
Read more >
SQL SERVER - Create Index Without Locking Table
Is your SQL Server running slow and you want to speed it up without sharing server credentials? In my Comprehensive Database Performance Health ......
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