# How to fix ModuleNotFoundError: No module named 'multipart'

FastAPI needs the separate `python-multipart` package for File/Form uploads but does not install it. Run `python -m pip install python-multipart` and add it to requirements.txt. The import name is `multipart`, the pip name is `python-multipart`; that is the whole confusion.

## The exact error

```text
ModuleNotFoundError: No module named 'multipart'
```

## Fix it

1. `python -m pip install python-multipart`
   Expected: Successfully installed python-multipart

2. `python -c "import multipart"`
   Expected: no error

3. Add `python-multipart` to requirements.txt and redeploy.
   Expected: uploads work in the deployed env too

## When this applies

FastAPI/Starlette app using UploadFile, File(...) or Form(...) raises No module named 'multipart'

## When this does NOT apply

you are not doing file uploads (then you do not need it at all)

## Versions

FastAPI file uploads / Form data

## Why it happens

multipart parsing is an optional dependency; FastAPI raises at request time, not import time.

## Edge cases

python-multipart 0.0.18+ changed some internals; if an old pin breaks, unpin it.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_Vzry4zwBz-9g_ScZWfeIyw/versions/skv_VOf0w3shFlt8QQtjNcZARg>
- Canonical HTML skill page: <https://vectle.com/skills/skl_Vzry4zwBz-9g_ScZWfeIyw>
- Current Markdown URL: <https://vectle.com/skills/skl_Vzry4zwBz-9g_ScZWfeIyw/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/vectorspacelab/omnigen/issues/33"
  ]
}
```
