# How to install ITK in windows

**URL:** https://discourse.itk.org/t/how-to-install-itk-in-windows/2490
**Category:** Uncategorized
**Created:** [December 9, 2019, 4:52am UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490 "2019-12-09T04:52:51Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![banikr](https://discourse.itk.org/user_avatar/discourse.itk.org/banikr/32/3296_2.png) [@banikr](https://discourse.itk.org/u/banikr)
#### Post date: [December 9, 2019, 4:52am UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/1 "2019-12-09T04:52:51Z")

</div>

I am using VS2019 , CMake and ITK 5.01

 ![image](https://discourse.itk.org/uploads/default/original/2X/d/df688f4435f08ebc2c09af6e1d0e3e31131aad52.png)

But after ALL\_BUILD in VS2019 I am ending with the above errors.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 9, 2019, 2:10pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/2 "2019-12-09T14:10:32Z")

</div>

[That is a known issue with VS2019](https://discourse.itk.org/t/has-anyone-tried-to-build-visual-studio-c-2019/1561/21), which has been resolved in 5.1b01 and 5.1rc01. [v5.1rc01](https://github.com/InsightSoftwareConsortium/ITK/releases/tag/v5.1rc01) was tagged only yesterday, it will be some days before all the packages are created. If you need the pre-build packages, use 5.1 beta1. But since you are compiling yourself, I suggest you to use the yesterday’s 5.1 release candidate 1.

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [December 9, 2019, 4:55pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/3 "2019-12-09T16:55:04Z")

</div>

If v5.1rc1 Python packages are desired, they have been uploaded and can be installed with

```auto
python -m pip install --upgrade pip
python -m pip install --upgrade --pre itk

```

We will finish the other release items and finalize the release next week.

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.itk.org/user_avatar/discourse.itk.org/banikr/32/3296_2.png) [@banikr](https://discourse.itk.org/u/banikr)
#### Post date: [December 9, 2019, 7:36pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/4 "2019-12-09T19:36:01Z")

</div>

I am expecting to use C++ codes so python is not what I am exactly looking for.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 9, 2019, 8:29pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/5 "2019-12-09T20:29:16Z")

</div>

If you want to use C++, it is even easier.

```bash
git clone https://github.com/InsightSoftwareConsortium/ITK.git
git checkout v5.1rc01

```

which I think can be combined as `git clone --branch v5.1rc01 https://github.com/InsightSoftwareConsortium/ITK.git`

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 9, 2019, 8:30pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/6 "2019-12-09T20:30:20Z")

</div>

If you don’t like `git`, you can download a [zipped-up source code](https://github.com/InsightSoftwareConsortium/ITK/archive/v5.1rc01.zip).

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.itk.org/user_avatar/discourse.itk.org/banikr/32/3296_2.png) [@banikr](https://discourse.itk.org/u/banikr)
#### Post date: [December 9, 2019, 8:31pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/7 "2019-12-09T20:31:07Z")

</div>

Thanks.  
And are all the other installation process the same?  
VS2019, CMake and everything?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 9, 2019, 8:33pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/8 "2019-12-09T20:33:27Z")

</div>

Yes, everything else should be the same. Moreover, if you previously used `git` to get the source code, you should now be able to do a `git pull`, do an incremental build in Visual Studio, and it should compile successfully.

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.itk.org/user_avatar/discourse.itk.org/banikr/32/3296_2.png) [@banikr](https://discourse.itk.org/u/banikr)
#### Post date: [December 9, 2019, 9:45pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/9 "2019-12-09T21:45:43Z")

</div>

I tried to install but getting the following error:

 ![image](https://discourse.itk.org/uploads/default/original/2X/b/b0fae33f83a9cd8237ead374d6d7be87b3dee502.png)

Is it somehow related to environment path?

I was trying to run the hello world installation example.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [December 10, 2019, 1:59pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/10 "2019-12-10T13:59:06Z")

</div>

You need to set `ITK_DIR` to the build path (or install path) of ITK. The correct folder has file `ITKConfig.cmake` in it.

---

<div class="post-metadata">

### Author: ![banikr](https://discourse.itk.org/user_avatar/discourse.itk.org/banikr/32/3296_2.png) [@banikr](https://discourse.itk.org/u/banikr)
#### Post date: [December 10, 2019, 6:40pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/11 "2019-12-10T18:40:05Z")

</div>

Hi,  
I solved it. Forgot to mention. It works now.  
Thanks a lot.

---

<div class="post-metadata">

### Author: ![Milad\_Rasooli](https://discourse.itk.org/user_avatar/discourse.itk.org/milad_rasooli/32/4357_2.png) [@Milad\_Rasooli](https://discourse.itk.org/u/Milad_Rasooli)
#### Post date: [September 3, 2024, 6:22pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/12 "2024-09-03T18:22:32Z")

</div>

I also faced this problem, but I could not find the file you mentioned

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [September 3, 2024, 6:23pm UTC](https://discourse.itk.org/t/how-to-install-itk-in-windows/2490/13 "2024-09-03T18:23:28Z")

</div>

You need to compile ITK for `ITKConfig.cmake` to be created in the build folder.
