Pip Offline Install Command Generator
Generate the exact pip download and pip install commands for offline, cross-platform Python package installation. Pick your source and target machines and get a ready-to-copy command pair — no more guessing at --platform, --python-version, or --abi. Everything runs locally in your browser; your package names and requirements never leave your device.
requirements.txt file you already have
./offline_packages folder across
Both commands use a local folder named offline_packages. Transfer that whole folder (e.g. via USB or internal network) to the offline machine before running Step 2.
How to Use This Pip Offline Command Generator
- Pick the source OS — the machine that has internet access and will download the packages.
- Pick the target OS — the offline machine where the packages will be installed. The tool automatically resolves the correct
--platformtag. - Choose the Python version and architecture of the target machine, then pick the PyPI mirror if you need one.
- Enter your packages — either switch to "From requirements.txt" (commands use
-r requirements.txt) or list package names one per line. - Copy both commands — run Step 1 on the online machine, transfer the
offline_packagesfolder, then run Step 2 on the offline machine.
Why Cross-Platform Pip Offline Install Is Hard
Downloading packages for another operating system is not the same as a normal pip download. When the target machine differs from the source machine, pip must know exactly what binary wheel to fetch, and that requires four flags specified together:
--platform— the target platform tag (e.g.win_amd64,manylinux2014_x86_64).--python-version— the target Python version, written without the dot (3.11 →311).--implementation— the interpreter implementation (almost alwayscpfor CPython).--abi— the target ABI tag (e.g.cp311).
On top of that, --only-binary=:all: is required so pip does not try to fetch source distributions that the offline machine cannot build. Miss any one of these and pip either errors out or downloads the wrong wheel. This tool assembles the full, correct command for you.
Command Flags Explained
| Flag | What it does |
|---|---|
pip download -d <dir> | Download packages (and their dependencies) into a local folder instead of installing them. |
--platform <tag> | Target operating system / platform tag. Required for cross-platform downloads. |
--python-version <ver> | Target Python version, no dots. 3.11 → 311, 3.9 → 39. |
--implementation cp | Target interpreter implementation; cp means CPython. |
--abi cp<ver> | Target ABI tag, e.g. cp311. Must match the Python version. |
--only-binary=:all: | Only download wheels (no source distributions). Required when targeting another platform. |
-i <url> | Use a specific PyPI index/mirror instead of the default pypi.org. |
pip install --no-index | Install without contacting any package index — local files only. |
--find-links=./offline_packages | Tell pip where the locally downloaded wheels live. |
Common Offline Install Scenarios
pip download for windows from linux (Linux → Windows)
The classic air-gapped setup: a Linux build server with internet prepares wheels for a Windows workstation that is cut off from the network. Set Source OS to Linux and Target OS to Windows, and the generator emits --platform win_amd64 together with the matching --abi. This is also the most error-prone direction, because skipping --only-binary=:all: makes pip fall back to source distributions that a Windows box without a compiler cannot build.
pip download for linux from windows (Windows → Linux)
Downloading wheels on a Windows workstation for an isolated Linux server means targeting the manylinux platform tags. The generator picks manylinux2014_x86_64 (or manylinux2014_aarch64 for ARM) so the wheels install on a broad range of distributions. If your target is a very old distro you may need an older manylinux tag, but for most modern systems manylinux2014 is the safe default.
pip download for macos from linux (Linux → macOS)
Preparing wheels on Linux for a Mac requires picking the right macOS tag: macosx_11_0_arm64 for Apple Silicon and macosx_10_15_x86_64 for Intel Macs. The architecture matters more here than on other platforms — an arm64 Mac simply cannot install x86_64 wheels — so double-check the Architecture field before you copy the command.
pip download for macos from windows (Windows → macOS)
Same target tags as above, but run from a Windows host. Note that the Source OS only changes the line-continuation character (^ on cmd, \ on bash); the download flags are driven entirely by the Target OS. So pick Target OS = macOS, choose Intel or Apple Silicon, and the command stays the same whether you run it on Windows or Linux.
pip download for linux from macos (macOS → Linux)
When a Mac is the only machine with internet and a Linux container host is offline, set Source OS to macOS and Target OS to Linux. The generated command targets manylinux2014_x86_64 (or the ARM variant) and works with pip installed via Homebrew. The main gotcha is picking the wrong architecture on ARM-based Linux servers.
pip download for windows from macos (macOS → Windows)
Downloading Windows wheels from a Mac follows the same rule: Target OS = Windows drives --platform win_amd64, and the Apple Silicon vs. Intel difference only affects how pip runs on the Mac, not the wheels it downloads. Select the Windows architecture (win_amd64 or win32) and copy the command pair.
pip offline install from requirements.txt
Most teams already pin their dependencies in a requirements.txt. Switch the input mode to From requirements.txt and both commands will reference -r requirements.txt, so you download and install the exact same set of packages on both machines. Paste the file content into the box if you want to review it here — the text is never uploaded.
pip download specific packages for offline install
When you only need two or three packages and don't maintain a requirements file, switch to Package names and list them one per line, optionally pinning versions with ==. The generator inlines the names directly into both commands, which is handy for quick one-off transfers like numpy and pandas.
FAQ
What is pip offline install?
Pip offline install means installing Python packages on a machine that has no internet access. You first download the packages (as .whl files) on an online machine with pip download, transfer the files to the offline machine, then install them with pip install --no-index --find-links=.... This tool generates both commands.
Why do I need --only-binary=:all:?
By default, pip download may fetch source distributions (.tar.gz) that need to be compiled during install. On an offline machine without a compiler — or on a different operating system — those builds fail. --only-binary=:all: forces pip to download only pre-built wheels, which install cleanly.
What if a package has no wheel for my target platform?
Not every package publishes a wheel for every platform. If a wheel does not exist for your target OS/architecture, pip download --only-binary=:all: will fail for that package. In that case you can remove --only-binary=:all: for that specific package, but be aware the offline machine will need the build toolchain to install a source distribution.
Can I download for multiple platforms at once?
Not in a single pip download invocation — the --platform, --python-version, and --abi flags describe one target at a time. To support several platforms, run the command once per platform into separate folders (e.g. offline_packages_win, offline_packages_linux).
Why must --platform, --python-version, --implementation, and --abi be set together?
They describe the target machine as a whole, and pip validates them as a group. If you set only --platform, pip still assumes the current interpreter's Python version and ABI, producing wheels that may not install on the target. Setting all four keeps the download consistent with the machine you are actually targeting.
Why does the download command use a different line-break character on Windows?
Multi-line commands need a "line continuation" character so the shell treats them as one command. On Linux and macOS (Bash/sh) that character is a backslash \; on Windows Command Prompt it is a caret ^. If you paste a \-wrapped command into cmd.exe, each line runs separately and fails. This tool picks the right character automatically from your Source OS.
Does this tool upload my package list or requirements.txt anywhere?
No. The entire generator runs locally in your browser with JavaScript. The command is assembled on your device, and nothing is sent to any server. This matters because internal package names and dependency structures can be sensitive information.