Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 1 | --- |
| 2 | layout: documentation |
| 3 | title: Installing Bazel on Windows |
| 4 | --- |
| 5 | |
ahumesky | 71c1441 | 2017-12-08 11:55:53 -0800 | [diff] [blame] | 6 | # <a name="windows"></a>Installing Bazel on Windows |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 7 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 8 | Supported Windows platforms: |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 9 | |
Laszlo Csomor | c3916f9 | 2018-03-05 00:29:00 -0800 | [diff] [blame] | 10 | * 64 bit Windows 7 or higher, or equivalent Windows Server versions. |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 11 | |
Laszlo Csomor | c3916f9 | 2018-03-05 00:29:00 -0800 | [diff] [blame] | 12 | Check |
| 13 | <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx">Microsoft's |
| 14 | Operating System Version table</a> to see if your OS is supported. |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 15 | |
Laszlo Csomor | c3916f9 | 2018-03-05 00:29:00 -0800 | [diff] [blame] | 16 | Before installing Bazel, make sure your system meets the system and software |
| 17 | requirements. See the page about [using Bazel on Windows](windows.html). |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 18 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 19 | Install Bazel on Windows using one of the following methods: |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 20 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 21 | * [Download the binary (recommended)](#download-the-binary-recommended) |
| 22 | * [Install using Chocolatey](#install-using-chocolatey) |
| 23 | * [Compile Bazel from source](install-compile-source.html) |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 24 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 25 | ## Download the binary (recommended) |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 26 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 27 | Go to Bazel's [GitHub releases page](https://github.com/bazelbuild/bazel/releases) |
Laszlo Csomor | c3916f9 | 2018-03-05 00:29:00 -0800 | [diff] [blame] | 28 | and download the Windows binary. |
| 29 | |
| 30 | For convenience, move the binary to a directory that's on your `%PATH%`. This |
| 31 | way you can run Bazel by typing `bazel` in any directory, without typing out the |
| 32 | full path. That said, you may put the binary anywhere on your filesystem. |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 33 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 34 | After you download the binary, you'll need additional |
| 35 | software and some setup in your environment to run Bazel. For details, see the |
| 36 | [Windows requirements](windows.html). |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 37 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 38 | ## Install using Chocolatey |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 39 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 40 | You can install the Bazel package using the [Chocolatey](https://chocolatey.org) |
| 41 | package manager: |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 42 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 43 | ```sh |
| 44 | choco install bazel |
| 45 | ``` |
Googler | 1fbef39 | 2017-03-22 09:05:09 +0000 | [diff] [blame] | 46 | |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 47 | This command will install the latest available version of Bazel and most of |
Laszlo Csomor | c3916f9 | 2018-03-05 00:29:00 -0800 | [diff] [blame] | 48 | its dependencies, such as the MSYS2 shell. This will not install Visual C++ |
michelleirvine | 5370ceb | 2017-10-06 19:52:49 +0200 | [diff] [blame] | 49 | though. |
| 50 | |
| 51 | See [Chocolatey installation and package maintenance |
| 52 | guide](https://bazel.build/windows-chocolatey-maintenance.html) for more |
| 53 | information about the Chocolatey package. |