-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when running poetry install
in a new (empty) project.
#689
Comments
A use-case for running install in an otherwise empty project is to improve caching behavior of Docker builds: I copy RUN touch /path/to/project/.empty Edit: though I guess I could just... not create the empty directory in the first place. That also works... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue, I believe, and is stale waiting on the maintainers. |
Please, can you test with the latest beta version of Poetry? |
In the current release, poetry ends up with
As all dependencies are installed before, the venv is sane. I wonder if we should just print out a warning instead of raising an exception? fin swimmer |
It seems that this error occurs when Poetry tries to install the current project's package; a workaround is to specify |
issue occurs when --no-root is specified. My use case: I have a monorepo with multiple packages. At the root level there is a pyproject.toml that has all shared and dev dependencies. Now, all other sub-applications also have pyproject.toml files, but some have no dependencies because they only use the shared dependencies. For example, all fastapi apps use the same dependencies, while the ML apps also have ML dependencies. Thus, i have a generic docker file, which calls poetry install for each package - but for those that have no dependencies, it fails. |
Hi Am I doing something else here than you guys did? |
This does not reproduce, and the ask to better support non-package/container-first use-cases is tracked in #1132 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Debian buster
Poetry version: 0.12.10
Issue
I was setting up a project, first I added some dependencies via
poetry add
(and I didn't add any actual code). Then I issuedpoetry install
which resulted in stacktrace below.It turns out I had empty directory named like the package (in poetry.toml below package name is "test" and I had empty directory named test). It looks like it triggered a bug in
find_packages
. When I added some code totest
package bug went away.Error stacktrace
poetry.toml
The text was updated successfully, but these errors were encountered: