Supported Windows platforms:
Check Microsoft's Operating System Version table to see if your OS is supported.
Python 2.7 or later.
Use the Windows-native Python version. Do not use Python that comes with the MSYS2 shell or that you installed in MSYS using Pacman because it doesn't work with Bazel.
You also need to set the
BAZEL_SH environment variable to point to
bash.exe. For example in the Windows Command Prompt (
Note: do not use quotes (") around the path like you would on Unixes. Windows doesn't need them and it may confuse Bazel.
Several MSYS2 packages.
Run the following command in the MSYS2 shell to install them:
pacman -Syuu git curl zip unzip
This may already be installed on your system.
Go to Bazel's GitHub releases page
and download the Windows binary1:
For convenience, move the binary to a directory that's on your
way you can run Bazel by typing
bazel in any directory, without typing out the
full path. That said, you may put the binary anywhere on your filesystem.
After you download the binary, you'll need additional software and some setup in your environment to run Bazel. For details, see the Windows requirements.
1Note that Bazel includes an embedded JDK 8, which can be used even if
a JDK is already installed. bazel-
You can install the Bazel package using the Chocolatey package manager:
choco install bazel
This command will install the latest available version of Bazel and most of its dependencies, such as the MSYS2 shell. This will not install Visual C++ though.
See Chocolatey installation and package maintenance guide for more information about the Chocolatey package.