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.

pip install of a directory is super slow

See original GitHub issue

See https://github.com/pypa/pip/issues/2195#issuecomment-524606986, for a summary of this issue.


I am dubious of why pip needs 17 seconds to process a local directory that is not on NFS (in fact, it’s on an SSD drive) for pip, which has no dependencies, since everything is vendored.

$ time pip install --no-install ~/dev/git-repos/pip
DEPRECATION: --no-install and --no-download are deprecated. See https://github.com/pypa/pip/issues/906.
Processing /Users/marca/dev/git-repos/pip
  Requirement already satisfied (use --upgrade to upgrade): pip==6.0.dev1 from file:///Users/marca/dev/git-repos/pip in /Users/marca/dev/git-repos/pip
pip install --no-install ~/dev/git-repos/pip  2.80s user 5.86s system 50% cpu 17.205 total

It should probably at least be logging whatever is taking that long, but maybe it shouldn’t even be doing whatever it’s doing.

Note that the “Processing” line appears right away and pretty much the whole delay seems to be between that line and the next one.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:24
  • Comments:77 (37 by maintainers)

github_iconTop GitHub Comments

10reactions
pradyunsgcommented, Jul 11, 2019

Implementing PEP 517 will solve this.

Narrator: it didn’t.

9reactions
dkbarncommented, Feb 22, 2021

FYI for those who are running into this issue – A workaround is to replace pip install . with:

python setup.py bdist_wheel
pip install dist/*.whl
Read more comments on GitHub >

github_iconTop Results From Across the Web

Sometimes pip install is very slow - python - Stack Overflow
Sometimes pip install is very slow · 1 · Some packages need to be compiled. · it may be a network issue, as...
Read more >
Making pip installs a little less slow - Python⇒Speed
Installing packages with pip, Poetry, and Pipenv can be slow. Learn how to ensure it's not even slower, and a potential speed-up.
Read more >
Do installed python packages slow your program down if you ...
No, installed python packages that you don't import do not slow down your program unless they are imported. But there are 2 caveats:....
Read more >
How to make virtualenvs faster - Medium
It's common knowledge that virtualenvs are slow. I rarely have the patience to wait for 20 seconds for the environment to be created....
Read more >
Best Practices and Performance Tips | MIT SuperCloud
Python will then only go to your home directory for these installed packages, and so should be less load on the shared filesystem....
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