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.

`poetry install` installs the project as a dependency of itself?

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Question

TL;DR: Is it expected behaviour when doing poetry install for the project to install itself as a dependency of itself?

I have started a new project using poetry init and followed up by poetry adding all my dependencies. I then pushed, and then cloned the git repo to another PC.

After the clone, I opened the new folder and did poetry install in that folder. That created the new virtual environment, as expected, but it also seems as if it installed the project as a dependency of itself. Please see the screenshot below. This is also evident in the new egg-info folder that was created. I expected the installations to stop at the last package (requests). screenshot

I did not expect that behaviour and would like to confirm if that is the intention of poetry install. You can find my project files here:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:20
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

15reactions
skorokithakiscommented, May 14, 2019

@sdispater Do you know when this might be released? I am about to introduce poetry at our company and I think this behavior would hinder adoption, maybe I can wait a bit if the feature is coming soon.

14reactions
skorokithakiscommented, Jan 29, 2019

I would also like to vote for an option to not install the project. Furthermore, the documentation is currently inaccurate, as poetry list says about install: “Installs the project dependencies.”

I, and I think most other people, understand this to mean that it does not install the project itself.

My use case for this is that I mainly develop Django applications, and whenever I run poetry install I only want the dependencies to be installed, and not the project itself (as that does not make sense for my use case).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I make my project available in the poetry environment?
First, poetry must be able to find the package folder. poetry is able to do ... This will install all dependencies and install...
Read more >
Commands | Documentation | Poetry - Python dependency ...
The install command reads the pyproject.toml file from the current project, resolves the dependencies, and installs them. poetry install. If there is a...
Read more >
Dependency Management With Python Poetry
With the install command, Poetry checks your pyproject.toml file for dependencies then resolves and installs them. The resolving part is ...
Read more >
How To Install Poetry to Manage Python Dependencies on ...
In its current state, your project has no dependencies other than Python itself. Poetry can add new dependencies to your project directly from ......
Read more >
Software packaging using Poetry | network-automation-blog
In a way, Poetry automates a lot of specifics in handling dependencies for your project. It provides a command line tool to add/remove...
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