- Package:
- python3-fastapi
- Source:
- python3-fastapi
- Submitter:
- Otto Kekäläinen
- Date:
- 2025-01-19 08:27:02 UTC
- Severity:
- normal
Using latest version of FastAPI, it refuses to start and wants to be
re-installed via pip. This does not seem right?
# dpkg -l | grep fastapi
ii python3-fastapi 0.115.5-2 all
modern, fast, web framework for building APIs, based on type
hints
# which fastapi
/usr/bin/fastapi
# fastapi version
To use the fastapi command, please install "fastapi[standard]":
pip install "fastapi[standard]"
Traceback (most recent call last):
File "/usr/bin/fastapi", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/fastapi/cli.py", line 12, in main
raise RuntimeError(message) # noqa: B904
^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: To use the fastapi command, please install "fastapi[standard]":
pip install "fastapi[standard]"
This looks like a missing dependency on fastapi-cli (unpackaged) https://github.com/fastapi/fastapi-cli Both packages declare an entrypoint script for fastapi; the one in the fastapi package doesn't seem useful for Debian. regards Stuart
Ah, see https://github.com/fastapi/fastapi/discussions/11525 for why fastapi-cli was moved to a separate package, so avoid having fastapi depend on such a large set of packages. So as Stuart Prescott points out in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1090781#10 it would make more sense for these dependencies to be part of a new fastapi-cli package and to drop the /usr/bin/fastapi command from python3-fastapi. Best wishes, Julian
closing #1093046 as there's nothing to be done for src:fastapi, and even if there was, no optional dependency belongs in the Depends field, but instead in the Recommended/Suggests fields depending on their importance in the optional features they enable when present.