ComfyUI: ModuleNotFoundError: No module named 'requests' (fix)
ModuleNotFoundError: No module named 'requests' stops ComfyUI at startup, before the web server or any custom node loads. We reproduced it on ComfyUI v0.37.0 and fixed it.
1. The error
ComfyUI v0.37.0 started in a venv where everything from requirements.txt is installed except requests:
python main.py
Traceback (most recent call last):
File "/path/to/ComfyUI/main.py", line 252, in <module>
import server
File "/path/to/ComfyUI/server.py", line 45, in <module>
from app.frontend_management import FrontendManager, parse_version
File "/path/to/ComfyUI/app/frontend_management.py", line 16, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
ComfyUI exited with code 1 after detecting the device but before starting the web server: main.py line 252 imports server.py, which imports app/frontend_management.py, and that does import requests at line 16 (it is used to fetch frontend releases from GitHub). requests is listed in ComfyUI's requirements.txt. Do not count on another package pulling it in: in our venv, transformers 5.20.2 does not depend on it (only packages added for custom nodes did: gguf, insightface, ultralytics, PyGithub), so seeing it missing usually means the requirements were never installed into the Python that runs ComfyUI, or something uninstalled it.
2. Fix: install requirements.txt with the same Python
From the ComfyUI folder, using the Python that starts ComfyUI (your venv's python; in the Windows portable build, ..\python_embeded\python.exe run from inside the ComfyUI folder):
python -m pip install -r requirements.txt
Collecting requests (from -r requirements.txt (line 27))
Using cached requests-2.34.2-py3-none-any.whl.metadata (4.8 kB)
Using cached requests-2.34.2-py3-none-any.whl (73 kB)
Installing collected packages: requests
Successfully installed requests-2.34.2
(pip also printed a dependency warning about packages of unrelated custom nodes in our test venv; we left it out.) Started again, ComfyUI loaded all nodes and exited 0 (--quick-test-for-ci):
[INFO] Context impl SQLiteImpl.
[INFO] Will assume non-transactional DDL.
[INFO] Using RAM pressure cache.
If pip says requests is already installed and the error stays, you are installing into a different Python than the one running ComfyUI. See ComfyUI: No module named 'yaml' for how to find the right one.
Related: ComfyUI: No module named 'tqdm' · ComfyUI: No module named 'transformers' · Python: No module named 'requests' · ComfyUI: No module named 'sqlalchemy'
Frequently asked questions
Is requests required by ComfyUI?
Yes. It is in requirements.txt and app/frontend_management.py imports it when server.py loads, so ComfyUI exits with code 1 without it.
I installed requests but still get the error. Why?
It went into a different Python. Run python -m pip with the same python (or python_embeded\python.exe) that starts ComfyUI.
Written with AI assistance. Measured on 2026-10-24 on Linux, CPython 3.11.17, pip 26.2.2: ComfyUI v0.37.0 with torch 2.9.0+cpu, without requests and after pip install -r requirements.txt (requests 2.34.2). Output pasted unedited except shortened paths and one omitted pip warning. PlainTables is our extension; ComfyUI and requests are free.