
Our Three Step Process
March 15, 2026
All pip commands

Our Three Step Process
March 15, 2026
All pip commands
All pip commands Mostly used In ML
📦 1. Basic Installation & Upgrades
The bread and butter of setting up your experiment.
pip install <package>: The standard install.pip install <pkg1> <pkg2>: Install multiple libraries (e.g.,pip install torch torchvision).pip install -U pip: Upgradespipitself (essential for support of newer.whlformats).pip install <package> --upgrade: Forces an upgrade of an existing library to the latest version.pip install <package>==1.13.1: Installs a specific version. Crucial for matching PyTorch versions to your CUDA drivers.pip install <package>~=2.1.0: Installs a version compatible with 2.1.0 (allows patches but not breaking changes).
🛠️ 2. Research & Development Mode
Commands for when you are building your own library or using bleeding-edge research code.
pip install -e .: Editable mode. Links the current folder to your environment. If you change your code, the "installed" version updates instantly without re-installing.pip install git+https://github.com/user/repo.git: Installs a library directly from a GitHub repository (useful for papers that haven't hit PyPI yet).pip install "package[extra]": Installs optional dependencies (e.g.,pip install "ray[tune]"orpip install "pandas[excel]").pip install --pre <package>: Allows installation of pre-release or "alpha" versions (e.g., trying a new Beta of TensorFlow).
📋 3. Environment Replication & Auditing
Critical for moving from your local machine to a high-performance computing (HPC) cluster.
pip freeze > requirements.txt: Generates a "snapshot" of every library and version in your environment.pip install -r requirements.txt: Installs every library listed in a file—the standard way to share ML projects.pip list: Shows all installed packages and their versions.pip list --outdated: Identifies which of your ML libraries have newer versions available.pip show <package>: Displays metadata (location, dependencies, license). Use this to find exactly where yoursite-packagesare stored.pip check: Verifies if installed packages have compatible dependencies (great for debugging "DLL not found" errors).
🧹 4. Cleaning & Management
Managing the clutter of failed experiments.
pip uninstall <package> -y: Uninstalls a package without asking for "Yes/No" confirmation.pip cache purge: Clears the internal cache. If a download was corrupted (common with largetorchbinaries), run this.pip uninstall -r requirements.txt -y: Mass-uninstalls everything listed in your requirements file.
🏎️ 5. Advanced Configuration (The "Pro" Commands)
pip install <package> --no-cache-dir: Forces a fresh download. Useful if you're low on disk space or suspect a corrupted cache.pip install <package> -i https://pypi.tuna.tsinghua.edu.cn/simple: Uses a mirror index. If the official PyPI is slow or blocked, this can be 10x faster.pip install --no-index --find-links=/path/to/wheels <package>: Installs from local files only. Essential for servers that do not have internet access for security reasons.python -m pip <command>: The safest way to run pip. It ensures you are using the pip associated with the exact Python version you are currently running.
All pip commands Mostly used In ML
📦 1. Basic Installation & Upgrades
The bread and butter of setting up your experiment.
pip install <package>: The standard install.pip install <pkg1> <pkg2>: Install multiple libraries (e.g.,pip install torch torchvision).pip install -U pip: Upgradespipitself (essential for support of newer.whlformats).pip install <package> --upgrade: Forces an upgrade of an existing library to the latest version.pip install <package>==1.13.1: Installs a specific version. Crucial for matching PyTorch versions to your CUDA drivers.pip install <package>~=2.1.0: Installs a version compatible with 2.1.0 (allows patches but not breaking changes).
🛠️ 2. Research & Development Mode
Commands for when you are building your own library or using bleeding-edge research code.
pip install -e .: Editable mode. Links the current folder to your environment. If you change your code, the "installed" version updates instantly without re-installing.pip install git+https://github.com/user/repo.git: Installs a library directly from a GitHub repository (useful for papers that haven't hit PyPI yet).pip install "package[extra]": Installs optional dependencies (e.g.,pip install "ray[tune]"orpip install "pandas[excel]").pip install --pre <package>: Allows installation of pre-release or "alpha" versions (e.g., trying a new Beta of TensorFlow).
📋 3. Environment Replication & Auditing
Critical for moving from your local machine to a high-performance computing (HPC) cluster.
pip freeze > requirements.txt: Generates a "snapshot" of every library and version in your environment.pip install -r requirements.txt: Installs every library listed in a file—the standard way to share ML projects.pip list: Shows all installed packages and their versions.pip list --outdated: Identifies which of your ML libraries have newer versions available.pip show <package>: Displays metadata (location, dependencies, license). Use this to find exactly where yoursite-packagesare stored.pip check: Verifies if installed packages have compatible dependencies (great for debugging "DLL not found" errors).
🧹 4. Cleaning & Management
Managing the clutter of failed experiments.
pip uninstall <package> -y: Uninstalls a package without asking for "Yes/No" confirmation.pip cache purge: Clears the internal cache. If a download was corrupted (common with largetorchbinaries), run this.pip uninstall -r requirements.txt -y: Mass-uninstalls everything listed in your requirements file.
🏎️ 5. Advanced Configuration (The "Pro" Commands)
pip install <package> --no-cache-dir: Forces a fresh download. Useful if you're low on disk space or suspect a corrupted cache.pip install <package> -i https://pypi.tuna.tsinghua.edu.cn/simple: Uses a mirror index. If the official PyPI is slow or blocked, this can be 10x faster.pip install --no-index --find-links=/path/to/wheels <package>: Installs from local files only. Essential for servers that do not have internet access for security reasons.python -m pip <command>: The safest way to run pip. It ensures you are using the pip associated with the exact Python version you are currently running.
Other Blogs
Other Blogs
Check our other project Blogs with useful insight and information for your businesses
Other Blogs
Other Blogs
Check our other project Blogs with useful insight and information for your businesses



