Missing einops module fix
2025-07-032 turns3,142 charsgpt-4o
Summary
User encountered a missing einops module error while running ComfyUI and needed help fixing the dependency issue.
Messages
python3 main.py
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing
dependencies done. ** ComfyUI startup time: 2025-0
7-03 09:00:31.109 ** Platform: Darwin
** Python version: 3.10.0 (defa
ult, Dec 28 2024, 09:40:50) [Clang 16.0.0 (clang-1600.0.26.6)]** Python executable: /Users/da
nielkliewer/.pyenv/versions/3.10.0/bin/python3 ** ComfyUI Path: /Users/danielk
liewer/com01/ComfyUI ** ComfyUI Base Folder Path: /U
sers/danielkliewer/com01/ComfyUI ** User directory: /Users/danie
lkliewer/com01/ComfyUI/user ** ComfyUI-Manager config path:
/Users/danielkliewer/com01/ComfyUI/user/default/ComfyUI-Manager/config.ini ** Log path: /Users/danielkliew
er/com01/ComfyUI/user/comfyui.log [ComfyUI-Manager] PyTorch is no
t installed
Prestartup times for custom nod
es: 0.0 seconds: /Users/danielkl
iewer/com01/ComfyUI/custom_nodes/comfyui-easy-use 0.0 seconds: /Users/danielkl
iewer/com01/ComfyUI/custom_nodes/rgthree-comfy 0.7 seconds: /Users/danielkl
iewer/com01/ComfyUI/custom_nodes/comfyui-manager
Traceback (most recent call las
t): File "/Users/danielkliewer/co
m01/ComfyUI/main.py", line 127, in <module> import comfy.utils
File "/Users/danielkliewer/co
m01/ComfyUI/comfy/utils.py", line 30, in <module> from einops import rearrang
e ModuleNotFoundError: No module
named 'einops'
You're getting this error:
```
ModuleNotFoundError: No module named 'einops'
```
This means the Python package `einops` is missing from your environment. It's a common dependency in machine learning and image processing pipelines, including ComfyUI.
---
### ✅ Solution: Install `einops`
Run this command in your ComfyUI environment:
```bash
pip install einops
```
If you're using `pyenv` (as it looks like from your Python path), make sure you're in the correct virtual environment. You can confirm with:
```bash
which python
```
It should point to:
```
/Users/danielkliewer/.pyenv/versions/3.10.0/bin/python
```
If not, activate it:
```bash
pyenv activate 3.10.0
```
Then run the install again.
---
### 🧩 You Might Also Need:
Because the logs mention:
```
[ComfyUI-Manager] PyTorch is not installed
```
You’ll likely need this as well:
```bash
pip install torch torchvision torchaudio
```
Use the CPU or MPS (Apple Silicon) build depending on your Mac setup. If you’re on Apple M1/M2, use:
```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
```
Or for MPS (Apple Metal Performance Shaders):
```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/mps
```
---
### 💡 Tip
You can run:
```bash
pip install -r requirements.txt
```
If ComfyUI provides a `requirements.txt` file to automatically install all needed dependencies.
Let me know if you want a one-liner to install all commonly missing ComfyUI deps.
gpt-4o