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 graph does not show all top-level packages

See original GitHub issue

Issue description

My Pipfile contains the following:

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

[dev-packages]

[packages]
requests = "*"

[requires]
python_version = "2.7"

Pipenv graph then shows the output:

requests==2.21.0
  - certifi [required: >=2017.4.17, installed: 2018.11.29]
  - chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
  - idna [required: >=2.5,<2.9, installed: 2.8]
  - urllib3 [required: >=1.21.1,<1.25, installed: 1.24.1]

I add another package under [dev-packages]:

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

[dev-packages]
sphinx-rtd-theme = "*"

[packages]
requests = "*"

[requires]
python_version = "2.7"

Since sphinx-rtd-theme has a dependency towards requests, the graph now only shows requests underneath sphinx-rtd-theme.

sphinx-rtd-theme==0.4.2
  - sphinx [required: Any, installed: 1.8.3]
    - alabaster [required: >=0.7,<0.8, installed: 0.7.12]
    - babel [required: >=1.3,!=2.0, installed: 2.6.0]
      - pytz [required: >=0a, installed: 2018.9]
    - docutils [required: >=0.11, installed: 0.14]
    - imagesize [required: Any, installed: 1.1.0]
    - Jinja2 [required: >=2.3, installed: 2.10]
      - MarkupSafe [required: >=0.23, installed: 1.1.0]
    - packaging [required: Any, installed: 18.0]
      - pyparsing [required: >=2.0.2, installed: 2.3.1]
      - six [required: Any, installed: 1.12.0]
    - Pygments [required: >=2.0, installed: 2.3.1]
    - requests [required: >=2.0.0, installed: 2.21.0]
      - certifi [required: >=2017.4.17, installed: 2018.11.29]
      - chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
      - idna [required: >=2.5,<2.9, installed: 2.8]
      - urllib3 [required: >=1.21.1,<1.25, installed: 1.24.1]
    - setuptools [required: Any, installed: 40.6.3]
    - six [required: >=1.5, installed: 1.12.0]
    - snowballstemmer [required: >=1.1, installed: 1.2.1]
    - sphinxcontrib-websupport [required: Any, installed: 1.1.0]
    - typing [required: Any, installed: 3.6.6]

Expected result

I expected requests to also be shown at the top level, as it is a top-level dependency. The reason why I expect this is that other dependencies are shown multiple times. Look at for example six shown twice above.

I assume that it is reasonable to show main packages at the top and then also as again if it is a dependency of other packages.

Actual result

Steps to replicate

  1. Start in a fresh directory and call pipenv install requests
  2. Check pipenv graph
  3. Run pipenv install --dev sphinx-rtd-theme
  4. Check pipenv graph

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
Pastromhaugcommented, Dec 5, 2019

Hiya, just wanna add that I was also very confuse about this. I totally assumed that any top-level packages described in my pipfile would be the top-level packages in the graph and had no idea what I was looking at.

1reaction
jxltomcommented, Jan 19, 2019

So actually you would like to let the pipenv support pipenv graph --default, pipenv graph --dev or something like that which can show the default packages or dev packages only.

Moving declared packages in Pipfile to the top level is just a workaround which makes your own parsing easier.

Is my understanding right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv Documentation
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, ... graph will show you a dependency graph...
Read more >
Improve Your Python Package Management With pipenv
pipenv gives insight into your dependency graph with pipenv graph . pipenv hashes all dependencies. It will detect packages that have been ...
Read more >
Release and Version History — pipenv 2022.12.20.dev0 ...
Fixed behaviour of pipenv uninstall --all-dev . From now on it does not uninstall regular packages. ; Fix a bug that incorrect Python...
Read more >
A Cheatsheet for Python's Pipenv - IMTorg Kbase
Automatically finds your project home, recursively, by looking for a Pipfile. Automatically generates a Pipfile, if one doesn't exist.
Read more >
pipenv Documentation
Pipenv is a tool that aims to bring the best of all packaging worlds ... graph from correctly showing all dependencies when running...
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