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.

2nd-order dependencies missing from Pipfile.lock

See original GitHub issue

I believe the answer will be “astroid is packaged weird”, but this package is maintained by the PyCQA and works fine with the pip freeze > requirements.txt workflow, so I’m assuming other packages might exhibit this behavior.

$ pipenv --version
pipenv, version 7.0.1

$ pipenv install astroid --python=python2
Creating a virtualenv for this project…
Creating a Pipfile for this project…
Installing astroid…
Collecting astroid
  Using cached astroid-1.5.3-py2.py3-none-any.whl
Collecting wrapt (from astroid)
Collecting enum34>=1.1.3; python_version < "3.4" (from astroid)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting singledispatch; python_version < "3.4" (from astroid)
  Using cached singledispatch-
Collecting six (from astroid)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting lazy-object-proxy (from astroid)
Collecting backports.functools-lru-cache; python_version < "3.3" (from astroid)
  Using cached backports.functools_lru_cache-1.4-py2.py3-none-any.whl
Installing collected packages: wrapt, enum34, six, singledispatch, lazy-object-proxy, backports.functools-lru-cache, astroid
Successfully installed astroid-1.5.3 backports.functools-lru-cache-1.4 enum34-1.1.6 lazy-object-proxy-1.3.1 singledispatch- six-1.10.0 wrapt-1.10.11

Adding astroid to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock!

$ .venv/bin/pip freeze

$ cat Pipfile.lock
    "_meta": {
        file-spec": 3,
        "requires": {
            "python_version": "2.7"
        "sources": [
                "url": "",
                "verify_ssl": true
    "default": {
        "astroid": {
            "hashes": [
            "version": "==1.5.3"
        "lazy-object-proxy": {
            "hashes": [
            "version": "==1.3.1"
        "six": {
        "wrapt": {
    "develop": {}

backports.functools-lru-cache, enum34, and singledispatch are missing from the Pipfile.lock so future reinstalls (and CI runs) will fail.

$ pipenv graph
  - backports.functools-lru-cache [required: Any, installed: 1.4]
  - enum34 [required: >=1.1.3, installed: 1.1.6]
  - lazy-object-proxy [required: Any, installed: 1.3.1]
  - singledispatch [required: Any, installed:]
    - six [required: Any, installed: 1.10.0]
  - six [required: Any, installed: 1.10.0]
  - wrapt [required: Any, installed: 1.10.11]

I’m guessing that astroid’s installation conditionally includes the back-ported Python 2 dependencies, but pipenv graph seems to know about them so I don’t know why they’re missing.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:35 (35 by maintainers)

github_iconTop GitHub Comments

kennethreitzcommented, Sep 14, 2017

I’m going to see if I can fix this for you, but it won’t be easy.

kennethreitzcommented, Sep 14, 2017

Asteroid is packaged weird — very fancily, to be exact 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv install is not adding dependencies to Pipfile.lock
I have tried using pipenv lock but it yields the same Pipfile.lock. All the dependencies show up on pip list and the constraints...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Here, you'll learn how to troubleshoot Pipenv installation and locking issues. ... who uses this Pipfile will encounter locking and dependency errors.
Read more >
pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
Make sure your dependencies actually do resolve. If you're confident they are, you may need to clear your resolver cache. Run the following...
Read more >
Pipenv install with all the flags, explained - Micah Smith
--system : this flag means that dependencies will be installed to the ... If they are the same, then pipenv concludes that Pipfile.lock...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found