-
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
Extra dependency group not installed for FastAPI #9266
Comments
you need to activate the virtual environment in which poetry installs packages here's a demonstration that poetry is working just fine
|
@dimbleby I suppose I should have clarified. I have been working in the project virtualenv the whole time:
Perhaps the yanked line is of note? |
this is not what you said before probably you need to edit: though I get exactly the same result with or without I guess a more reproducible way to reproduce this is needed. Maybe build a docker container demonstrating whatever it is that you are doing. |
Sorry - I thought it was generally good practice to always have the project virtualenv activated, so I thought it was implied. Is the configuration given above not enough for reproducibility? Introducing docker will likely just have me stay with the workaround of manually specifying the optional dependencies. |
apparently not - I tried and failed |
@cjuracek - We're seeing potentially-similar behavior to this with fastapi |
Yes, this worked @mfulgo! Thank you. For clarity, the fix was:
This suggests the issue is |
We're still debugging, but the fact that |
or: if it works from pypi but not through a mirror, that implies there's something failing with the mirror... |
@dimbleby, yes, that's possible. Can you think of a reason that I can reproduce the issue with a local
Add this to a
Then:
Versus following that up with a
|
still does not reproduce for me, sorry:
|
maybe you somehow have something faulty in your poetry cache, try clearing it? |
We have (or had) the same issue with dependencies in combination with a private repository not working, in our case Artifactory. Could not find any differences in the packages from pypi or the private one, nor any real differences in the files that would make it look like it should fail. In our case it was the After debugging around the poetry source, I found the culprit to be the I fixed it by doing
After that the package installs fine. Hope this helps. |
That (plus a cache clear for good measure) worked for me. |
I'll check the solution later, and report back if it doesn't work for some reason. Thanks for the help everyone! |
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. |
Description
I would like to install
fastapi
with all optional dependencies (fastapi[all]
). Following the FastAPI tutorial (withmain.py
in the working directory):Command:
Actual behavior:
After
poetry add -G app h11
:After
poetry add -G app starlette
:After
poetry add -G app pydantic
: Successfuluvicorn
commandExpected behavior: Immediate success after installation of
fastapi
without intermediate installs needed.When installing the optional dependencies through
pip
viapip install "fastapi[all]"
, the manualh11
,starlette
, andpydantic
installs are not needed. This suggests to me that poetry is not installing the optional dependencies defined by[all]
in the same waypip
is.Workarounds
Manually
poetry add
the optional dependencies as neededPoetry Installation Method
install.python-poetry.org
Operating System
MacOS Ventura 13.6.4
Poetry Version
1.8.2
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs
Error is not from poetry command
The text was updated successfully, but these errors were encountered: