How to Fix Custom Node requirements.txt Not Installed in ComfyUI
Fix ComfyUI custom nodes that fail to load because their requirements.txt dependencies were never installed in the correct Python environment.
Community Knowledge
This page is based on common ComfyUI troubleshooting patterns and has not been fully tested across all environments. Back up your environment before changing packages.
If a ComfyUI custom node shows IMPORT FAILED in the startup log because of a ModuleNotFoundError, the most common cause is that the node's requirements.txt was never installed.
Cloning or downloading a custom node into custom_nodes/ only copies the code. The Python packages that code depends on must be installed separately.
Fast answer
For the GitHub Windows portable package:
.\python_embeded\python.exe -s -m pip install -r ComfyUI\custom_nodes\<node-name>\requirements.txt
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-buildAlways read the requirements file first to check for risky package changes.
What the error looks like
IMPORT FAILED: ComfyUI-ExampleNode
Traceback (most recent call last):
File "...\custom_nodes\ComfyUI-ExampleNode\__init__.py", line 4, in <module>
import somepackage
ModuleNotFoundError: No module named 'somepackage'The node folder exists in custom_nodes/, but the import fails because somepackage is not installed.
Why it happens
- Manual git clone without pip install: You cloned the node repo but forgot to install its requirements
- ComfyUI Manager partial install: Manager may have cloned the repo but the requirements install step failed silently
- Environment was rebuilt: You reinstalled ComfyUI or updated the portable package, wiping previously installed packages
- Wrong Python used for install: Requirements were installed into system Python, not ComfyUI's embedded Python
- No requirements.txt: Some nodes list dependencies only in their README, not in a requirements file
Step-by-step fix
Step 1: Find the failing node
Check the ComfyUI startup log for IMPORT FAILED lines. The line tells you which custom node folder failed and which module is missing.
Step 2: Check if requirements.txt exists
dir ComfyUI\custom_nodes\<node-name>\requirements.txtIf it exists, proceed to Step 3. If not, check the node's README on GitHub for manual dependency instructions.
Step 3: Read the requirements file before installing
type ComfyUI\custom_nodes\<node-name>\requirements.txtLook for red flags:
| What to watch for | Risk |
|---|---|
torch, torchvision, torchaudio | May replace your CUDA-enabled PyTorch with a CPU version |
Unpinned versions (no == or >=) | May install incompatible versions |
opencv-python when you have opencv-python-headless | Can cause DLL conflicts |
| Very old or very new version pins | May conflict with other nodes |
If the file looks safe, proceed. If it contains torch or other core packages, consider installing only the actually missing packages manually instead.
Step 4: Install the requirements
For Windows portable:
.\python_embeded\python.exe -s -m pip install -r ComfyUI\custom_nodes\<node-name>\requirements.txtFor a manual venv:
python -m pip install -r custom_nodes/<node-name>/requirements.txtStep 5: If the requirements file would break your environment
Instead of installing everything, install only the specific missing package:
.\python_embeded\python.exe -s -m pip install somepackageThis is safer when the requirements file includes core packages like torch.
Step 6: Verify
Restart ComfyUI and check that the IMPORT FAILED line is gone:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-buildBatch-installing requirements for all custom nodes
If multiple nodes have missing requirements, you can install them all, but this carries more risk:
for /d %d in (ComfyUI\custom_nodes\*) do if exist "%d\requirements.txt" .\python_embeded\python.exe -s -m pip install -r "%d\requirements.txt"Warning: Running this blindly can cause dependency conflicts. It is safer to install requirements one node at a time, checking for errors between each install.
When not to run pip install blindly
- Always read
requirements.txtbefore running it — some node authors pin aggressive torch versions - If
pip checkshows conflicts after installing, do not keep installing more requirements. Fix the conflict first - If a requirements file is very old, the pinned versions may not work with your current Python or PyTorch
- Consider using
--no-depsfor individual packages if you only need the package itself, not its dependency tree
How Wonderful Launcher can help
Wonderful Launcher helps detect custom nodes with uninstalled requirements and assists with installing them safely. It checks for conflicts before installing and helps prevent requirements from breaking your core PyTorch setup.
Download Wonderful Launcher — it's free and helps manage custom node dependencies.
Related errors
- ComfyUI Plugin Import Failed
- ComfyUI Dependency Conflicts
- ComfyUI Custom Nodes Broke Environment
- Install Custom Nodes
- Plugin Missing Module Warning: When It Is Safe to Ignore
Source References
You can fix it manually, or download Wonderful Launcher for Windows to diagnose plugin errors, missing dependencies, and broken ComfyUI environments without reinstalling.
Download free for WindowsDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.