pip – explained simply
pip is the installer for Python packages; with it, you download the building blocks an AI tool needs.
Also: pip install, requirements.txt, PyPI
pip gets packages by default from the Python Package Index (PyPI), a public directory where anyone can upload Python software. Many projects list the packages they need in a file called requirements.txt.
With python -m pip install -r requirements.txt, you install all the packages from this list at once. What matters is which Python you use to run pip: in an activated venv, the package ends up there; for ComfyUI Portable, the documentation says to use .\python_embeded\python.exe -m pip install.
For PyTorch, a simple pip install torch is often not enough because you need the version for your graphics card. The install command on pytorch.org includes an extra package source with the CUDA version for that.
What does that mean for you? Always run pip as python -m pip with the Python for the respective tool, so you don't accidentally install anything into the wrong directory.
Related terms
Errors where that matters
- 'python' is not recognized or opens the Microsoft Store
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate – Python does not trust the certificate (often a company proxy or antivirus)
- A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x – a package does not match the installed NumPy version
- A1111: INCOMPATIBLE PYTHON VERSION / Couldn't install torch
- ComfyUI-Manager: This action is not allowed with this security level
- CUDA gone after installing a custom node or package
- CUDAExecutionProvider is not in available provider names (onnxruntime runs only on the CPU)
- Custom Node: IMPORT FAILED
- ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied – pip cannot modify a file
- Failed building wheel for insightface (insightface for ReActor/IPAdapter FaceID won’t install)
- faster-whisper: cublas64_12.dll is not found
- ffmpeg is required for video outputs and could not be found (Video Combine cannot save a video)
- Frontend package outdated after update (comfyui-frontend-package)
- ImportError: DLL load failed while importing …: The specified module could not be found – a Python package is missing a Windows DLL
- module 'torch' has no attribute 'float8_e4m3fn' (PyTorch too old for fp8)
- No matching distribution found for torch (wrong Python version)
- No module named 'sageattention' (starting with --use-sage-attention fails)
- No module named 'triton' on Windows (triton-windows missing)
- No module named … (missing Python package for custom node)
- OSError: CUDA_HOME environment variable is not set (CUDA toolkit with nvcc is missing during compilation)
- Path too long: Filename too long / Windows Long Path support
- pip install TTS: No matching distribution found for TTS (Coqui TTS does not fit your Python version)
- pip: error: externally-managed-environment (Linux/WSL)
- pip: Microsoft Visual C++ 14.0 or greater is required
- SwarmUI: Torch not compiled with CUDA enabled
- text-generation-webui: ModuleNotFoundError: No module named 'llama_cpp_binaries' (llama.cpp loader missing after update)
- Torch not compiled with CUDA enabled
- Transformers: FlashAttention2 has been toggled on, but … flash_attn seems to be not installed (FlashAttention missing)
- Weights only load failed / Unsupported global (PyTorch blocks old .pt models starting in 2.6, e.g. YOLO in the Impact Pack)
- xFormers can't load C++/CUDA extensions (version conflict)