Reference only

Where to run ComfyUI commands: PowerShell, CMD and virtual environments

Identify the shell, interpreter and working directory before copying an installation command.

Identify the shell and interpreter

A terminal command, a Python statement and a ComfyUI prompt are different inputs. Our recommendation is to identify the interface before pasting anything, especially when a tutorial says only “run this command.”

PowerShell uses the call operator for a quoted executable path. CMD syntax differs. Python also documents direct use of a virtual environment's interpreter without requiring activation.12

& "D:\ComfyUI\python_embeded\python.exe" -m pip --version
"D:\ComfyUI\python_embeded\python.exe" -m pip --version

These are example paths: replace them with the executable recorded by your launcher. Before acting on a relative path, check the current directory with Get-Location in PowerShell or cd in CMD. On Linux or macOS, check pwd and use an explicit environment path such as ./.venv/bin/python.

In a notebook, inspect sys.executable in a Python cell, then compare that kernel with the process running ComfyUI. They are not proven identical just because they share a machine.

Start with a version or metadata query before an installation. Import-to-distribution metadata mapping has limitations, including some editable installs.3 Keep prior records and redact credentials when sharing output. Do not change a global execution policy merely to avoid identifying the correct interpreter.

Sources and language parity rechecked 2026-09-25. These example paths were not run against a ComfyUI installation; no GPU reproduction is claimed. Use your actual interpreter and working directory.

Was this page helpful?

Anonymous. Only a yes/no counter is stored; no account, IP address or device details.

Sources & references

Microsoft PowerShell and Python venv/metadata documentation rechecked on 2026-09-25. Example ComfyUI paths were not executed against a local installation; no GPU reproduction.

01Microsoft: PowerShell call operatorSource checked: 2026-09-2502Python: virtual environmentsSource checked: 2026-09-2503Python: installed distribution metadataSource checked: 2026-09-25

Report an issue · 0741ff44-8f97-50ed-bbd9-8333d5402e29