[Python] FastAPI "ERROR: Failed building wheel for python-multipart" in basic "hello world"...

Discussão em 'Python' iniciado por Stack, Setembro 2, 2025.

  1. Stack

    Stack Membro Participativo

    I follow the FastAPI "hello world" tutorial. As step 1, I need to run (I use python 3.8 in a venv):

    pip install "fastapi[all]"


    but I get:

    Building wheels for collected packages: python-multipart
    Building wheel for python-multipart (setup.py) ... error
    ERROR: Command errored out with exit status 1:
    command: venv/my_venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u0lo92at/python-multipart/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u0lo92at/python-multipart/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-f5_nolf4
    cwd: /tmp/pip-install-u0lo92at/python-multipart/
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: setup.py --help [cmd1 cmd2 ...]
    or: setup.py --help-commands
    or: setup.py cmd --help

    error: invalid command 'bdist_wheel'
    ----------------------------------------
    ERROR: Failed building wheel for python-multipart
    Running setup.py clean for python-multipart
    Failed to build python-multipart


    When I go over to step 2, it says:

    $ uvicorn main:app --reload

    Command 'uvicorn' not found, but can be installed with:

    sudo apt install uvicorn


    although uvicorn is said to be installed with the command in the first place:

    [​IMG]

    What should I do to run uvicorn main:app --reload?

    Continue reading...

Compartilhe esta Página