#1090781 fastapi: unable to start, reports 'please install "fastapi[standard]"'

#1090781#5
Date:
2024-12-19 03:40:09 UTC
From:
To:
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]"

#1090781#10
Date:
2024-12-19 05:38:31 UTC
From:
To:
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

#1090781#15
Date:
2025-01-19 08:13:53 UTC
From:
To:
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

#1090781#20
Date:
2025-01-19 08:23:38 UTC
From:
To:
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.

#1090781#25
Date:
2026-09-26 08:22:07 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
fastapi, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1090781@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sandro Tosi <morph@debian.org> (supplier of updated fastapi package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 26 Sep 2026 03:56:39 -0400
Source: fastapi
Architecture: source
Version: 0.141.1-2
Distribution: unstable
Urgency: medium
Maintainer: Sandro Tosi <morph@debian.org>
Changed-By: Sandro Tosi <morph@debian.org>
Closes: 1090781 1093472
Changes:
 fastapi (0.141.1-2) unstable; urgency=medium
 .
   * debian/control
     - bump debhelper compat to 14; add dh-sequence-python3 and
       dh-sequence-single-binary to b-d
     - drop the manual Depends on pydantic and starlette, and the substvars;
       dh_python3 generates the versioned dependencies from the upstream
       metadata
     - bump versioned b-d on pydantic, starlette and typing-extensions to the
       upstream minimums; add versioned b-d on annotated-doc and
       typing-inspection
     - drop aiofiles, aiosqlite, databases, passlib, peewee and requests from
       b-d, no longer needed by tests
     - add sqlalchemy to b-d, needed by tests and previously pulled in by
       databases
     - drop Priority, optional is now the default
     - bump Standards-Version to 4.7.4.1 (no further changes needed)
     - point Homepage to the new upstream location
     - fix the bullet list formatting in the long description; drop the
       outdated minimum Python version
   * debian/rules
     - drop --with python3, replaced by dh-sequence-python3
     - run test_response_by_alias, test_root, test_async_testing,
       test_dependency_gets_exception and test_path_operation_img, now passing
     - install the upstream changelog; patch by Julian Gilbey; Closes: #1093472
     - don't install the fastapi command, it requires fastapi-cli which is not
       available in Debian; Closes: #1090781
   * debian/pybuild.testfiles
     - install favicon.png at the path expected by test_path_operation_img;
       the docs/en/docs/img/ entry was not copying anything
   * debian/python3-fastapi.pyremove
     - remove the .agents directory, containing the upstream AI agent skill
   * debian/source/options
     - remove, pdm-backend doesn't generate egg-info
   * debian/copyright
     - update upstream source URL; add stanza for termynal; extend packaging
       copyright years
   * debian/watch
     - convert to version 5, using the GitHub template
   * debian/upstream/metadata
     - update to the new upstream location; add Changelog and Documentation
Checksums-Sha1:
 d164a54c9ba1dcbc317dffaa7790f93a4bde220c 2845 fastapi_0.141.1-2.dsc
 4692aa56c4fa67d8cc8d6ec870b414fdb01ca6b7 5604 fastapi_0.141.1-2.debian.tar.xz
 49c28869a96e2f159cfcc2c59640995f84e1204e 10564 fastapi_0.141.1-2_source.buildinfo
Checksums-Sha256:
 bb0e37b8d712b5f76b56068c45ea392020072828b9d897455f0fd01b34e26f04 2845 fastapi_0.141.1-2.dsc
 faeaabdf500e64631ea1a1f3de4512d62ff5ea974ec3872beda94bd60f5d3395 5604 fastapi_0.141.1-2.debian.tar.xz
 d190c2c17f1a417b0ca97e62511b331f38ae6cc0bafc8175ce4031a5bcb02e88 10564 fastapi_0.141.1-2_source.buildinfo
Files:
 0d9c12dfc74e1182597c859118f0ed2e 2845 python optional fastapi_0.141.1-2.dsc
 5cf1e35e1091fd3f7226733280fc1220 5604 python optional fastapi_0.141.1-2.debian.tar.xz
 f6ebfb16253b3b1c53e59ec417fed8af 10564 python optional fastapi_0.141.1-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEufrTGSrz5KUwnZ05h588mTgBqU8FAmq3etQACgkQh588mTgB
qU+R5Q/9Gqwm+Hen0tAb+8AGRojcuQA1KlfK8ABLMPEU3mZyRrwR3GMdAmksocXz
haibXPvid9aUBEjA+2asB2JcSf85y0KCq2agMOhwUq5/ksCUwGuMu4FpBWmy7n0L
iXrWcisceopnryWVrMpbpiEsCqSnnAuLlBuNFgn2YxYNbyQnc5Bj8516a4DQX/w1
7cn6oZ/GiFNbm0DxSjUxaXFasIorZEDntJalSSiuLMRmUhA1oSOQMYgu7lEpFLYF
4ytxRU6SmwhonINXFou2jcX+2NspDLY5dWnluEAEnID86zFeEjcRfbYgER+3zt3W
L/rotXbxTv4cUXwe1tYi9sNQPHfq+7QelG9hxmt3YChbSvAmblP1MX3/U7NfaDQx
QZv0sBerqSzQ++ybBRXAj6E5on/a89bSydvCWibuUwafEu6rjHCdv91tjr35T93A
MIAtQgjKzsD28QkIVkEJC/zs6P+Isdq24R3I/8rbaL8ALA+EfBf17uF4x6ln0H00
btrtdsFKsJ1C99lIYLruBHLrEsgtxpQ0QvaJRr1XElswKVCJy9virRPaYZLm6yWR
vzCDdzFXcHq0WNihR37xXZrKrevhHFuZ1eZ53eOcfTvzj2VONhyn7GSui5ql2uzw
3zduEnaR8hahozzgZGj9mwkLwEqNN0olaQ9jJCyI/caMmZl5CVs=
=FCZD
-----END PGP SIGNATURE-----