LogoWonderful Launcher
  • Product
  • Pricing
  • Solutions
  • Docs
  • Blog
  • Get Help
  • Download

Understanding ComfyUI's Embedded Python Environment

Needs verification

Learn how ComfyUI's python_embeded folder works, why packages must be installed there, and how to avoid common environment mistakes.

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 you use the Windows portable version of ComfyUI, all Python packages must be installed into the python_embeded folder — not your system Python, not a separate virtual environment.

Many ComfyUI troubleshooting problems trace back to installing packages into the wrong Python. Understanding how python_embeded works saves hours of debugging.

What python_embeded is

The official ComfyUI portable package for Windows ships with its own self-contained Python installation inside a folder called python_embeded. This folder contains:

  • A standalone Python interpreter (e.g., Python 3.12)
  • Pre-installed packages including PyTorch with CUDA support
  • The pip package manager
  • All dependencies needed to run ComfyUI

This embedded Python is completely separate from any Python you may have installed on your system through the Microsoft Store, python.org, Anaconda, or other means.

Why it exists

  • Isolation: Prevents conflicts with system Python or other Python projects
  • Reproducibility: Everyone using the portable package starts with the same environment
  • CUDA compatibility: The portable package bundles a specific PyTorch version matched to a specific CUDA build
  • Simplicity: Users do not need to manage virtual environments manually

The most common mistake

When you run pip install somepackage in a terminal, it installs into whatever Python pip belongs to — usually your system Python, not ComfyUI's embedded Python.

Wrong (installs into system Python):

pip install insightface
python -m pip install insightface

Correct (installs into ComfyUI's embedded Python):

.\python_embeded\python.exe -s -m pip install insightface

The -s flag tells Python to skip the user site-packages directory, ensuring packages only go into the embedded environment.

How to verify which Python ComfyUI uses

Check the batch file

Open run_nvidia_gpu.bat in a text editor. You will see something like:

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

This confirms ComfyUI uses the embedded Python.

Check what is installed

.\python_embeded\python.exe -s -m pip list

This shows all packages visible to ComfyUI. If a package is not in this list, ComfyUI cannot use it, even if it is installed in your system Python.

Check the Python version

.\python_embeded\python.exe --version

Common problems and fixes

"I installed the package but ComfyUI still says it's missing"

You probably installed it into the wrong Python. Verify:

.\python_embeded\python.exe -s -m pip show somepackage

If it shows nothing, install it again with the full path:

.\python_embeded\python.exe -s -m pip install somepackage

"pip is not recognized"

You are running pip from a terminal that does not have Python in its PATH. Use the full path instead:

.\python_embeded\python.exe -s -m pip install somepackage

"I accidentally installed packages into system Python"

This is harmless to ComfyUI — it simply did not get the package. Install again using the embedded Python path.

"Can I use a virtual environment instead?"

Yes, but then you are using the manual install method, not the portable package. The portable python_embeded already acts as an isolated environment. Creating a venv inside it would add unnecessary complexity.

"Can I update the embedded Python version?"

Do not replace the Python interpreter inside python_embeded manually. If you need a newer Python version, download a newer ComfyUI portable package or switch to a manual install with your own Python and venv.

How the folder structure works

ComfyUI_windows_portable/
├── python_embeded/           ← The embedded Python installation
│   ├── python.exe            ← The interpreter ComfyUI uses
│   ├── Lib/
│   │   └── site-packages/    ← Where pip installs packages
│   └── Scripts/
├── ComfyUI/                  ← The ComfyUI source code
│   ├── main.py
│   ├── requirements.txt
│   ├── custom_nodes/
│   └── models/
├── run_nvidia_gpu.bat         ← Launches ComfyUI with GPU
└── run_cpu.bat                ← Launches ComfyUI on CPU only

How Wonderful Launcher can help

Wonderful Launcher helps eliminate the embedded Python confusion. It helps manage the Python environment, guides you to install packages into the correct location, and helps prevent the "wrong Python" problem that causes most dependency errors.

Download Wonderful Launcher — it's free and helps simplify environment management.

Related guides

  • Install ComfyUI Portable
  • Install ComfyUI Manual
  • ComfyUI Dependency Conflicts
  • ComfyUI Repair Broken Portable Dependencies
  • ComfyUI Startup Failed

Source References

  • ComfyUI GitHub
  • Python Embedded Distribution Docs
  • pip Documentation

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 Windows

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

What python_embeded is
Why it exists
The most common mistake
How to verify which Python ComfyUI uses
Check the batch file
Check what is installed
Check the Python version
Common problems and fixes
"I installed the package but ComfyUI still says it's missing"
"pip is not recognized"
"I accidentally installed packages into system Python"
"Can I use a virtual environment instead?"
"Can I update the embedded Python version?"
How the folder structure works
How Wonderful Launcher can help
Related guides
Source References