# ITK Install issues on VS2022

**URL:** <https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821>\
**Category:** Beginner Questions\
**Tags:** cmake, itk-releases, python\
**Created:** [February 21, 2022, 3:20pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821 "2022-02-21T15:20:43Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 21, 2022, 3:20pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/1 "2022-02-21T15:20:43Z")

</div>

Dear all,  
I was trying to install ITK for transforming the .TRE files from ITKTubeTK - Bullitt - Healthy MR Database to common image format for phantom for several days. My environment is python 3.10, ITK 5.2.1/ITK 5.3rc02, VS2022, and win11. First I tried to install via python package, there was a legacy-install-failure error and I cannot find solution for it. So I turned to install via source code via Cmake 3.22.2, I followed several install tutorials and installed for several times, and there was an error “could not find git for clone of TubeTK” during configure process when I select the ModuleITKtubeTK. I ignored and configured to generate. But after the build process, there were 95 errors of “cannot open file ‘python310\_d.lib’” and 787 warnings of “‘Pyeval\_initthread’: deprecated in 3.9”.

Thanks  
Xiang

---

<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:** [February 21, 2022, 3:33pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/2 "2022-02-21T15:33:12Z")

</div>

If you want to build Python wrappings in Debug mode, you need to install “Debug” python library. This is off by default. Also, code compiled that way would be very slow.

Recommended way is to build in RelWithDebInfo mode, which can be link to regular Python install. It can debugged if needed, but some/many symbols will be unavailable because they were optimized away.

The latest ITK 5.3rc03 is highly recommended.

@Stephen_Aylward is enabling `Module_TubeTK` during ITK configure a good/supported way of building TubeTK?

---

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 21, 2022, 3:41pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/3 "2022-02-21T15:41:47Z")

</div>

Thank u so much for the quick response. Are the ITK 5.3rc03 is on Github? I just downloaded the rc02 from [ITK.org](http://ITK.org). I will search for how to change the build mode.

Thx  
Xiang

---

<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:** [February 21, 2022, 3:59pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/4 "2022-02-21T15:59:10Z")

</div>

Yes, [5.3RC3](https://github.com/InsightSoftwareConsortium/ITK/releases/tag/v5.3rc03) is tagged on GitHub. It is not on [itk.org](http://itk.org) because we haven’t made a public announcement yet.

---

<div class="post-metadata">

**Author:** ![Stephen\_Aylward](https://discourse.itk.org/user_avatar/discourse.itk.org/stephen_aylward/32/654_2.png) [@Stephen\_Aylward](https://discourse.itk.org/u/Stephen_Aylward)\
**Post date:** [February 21, 2022, 4:37pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/5 "2022-02-21T16:37:50Z")

</div>

Yes. It is recommended to enable Module\_TubeTK during initial configuration.

Note that TubeTK also requires (recommends unless disabled) VTK. Compile VTK in the same mode (Release/Debug/whatever) that you intended to use with ITK. Python wrapping is also supported in VTK, but not required.

---

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 21, 2022, 7:05pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/6 "2022-02-21T19:05:58Z")

</div>

Hi Stephen, I downloaded the ITK nightly master from Github, actually after enabled the TubeTK I got an error during configure process  
CMake Error at CMake/ITKModuleRemote.cmake:12 (message):  
Failed to clone repository:  
‘[https://github.com/InsightSoftwareConsortium/ITKTubeTK.git](https://github.com/InsightSoftwareConsortium/ITKTubeTK.git)’  
Call Stack (most recent call first):  
CMake/ITKModuleRemote.cmake:134 (\_git\_clone)  
CMake/ITKModuleRemote.cmake:236 (\_fetch\_with\_git)  
Modules/Remote/TubeTK.remote.cmake:47 (itk\_fetch\_module)  
Modules/Remote/CMakeLists.txt:10 (include)

---

<div class="post-metadata">

**Author:** ![Stephen\_Aylward](https://discourse.itk.org/user_avatar/discourse.itk.org/stephen_aylward/32/654_2.png) [@Stephen\_Aylward](https://discourse.itk.org/u/Stephen_Aylward)\
**Post date:** [February 21, 2022, 7:21pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/7 "2022-02-21T19:21:59Z")

</div>

That could have been a glitch in the internet. Could you please try a second time. It is suggesting that the GitHub repo doesn’t exist, and it does, so …

---

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 22, 2022, 3:53am UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/8 "2022-02-22T03:53:02Z")

</div>

Yes, that is an internet issue and got fixed. Nevertheless, I now got another cmake error Could NOT find NumPy (missing: PYTHON\_NUMPY\_INCLUDE\_DIR) (found version “”)

---

<div class="post-metadata">

**Author:** ![Stephen\_Aylward](https://discourse.itk.org/user_avatar/discourse.itk.org/stephen_aylward/32/654_2.png) [@Stephen\_Aylward](https://discourse.itk.org/u/Stephen_Aylward)\
**Post date:** [February 22, 2022, 4:14am UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/9 "2022-02-22T04:14:19Z")

</div>

Pip install numpy

Before running cmake to configure itk.

S

---

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 23, 2022, 5:15am UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/10 "2022-02-23T05:15:53Z")

</div>

Hello Stephen, I recently downloaded the nightly master versions of VTK and ITK and compiled them to build. Nevertheless, During the build of install project with VS 2022 run as admin, I met an error called "MSB3073 The command "setlocal ". I searched on websites, and answers were given with permission issues. But I already run VS as admin, Thanks for your patience!

---

<div class="post-metadata">

**Author:** ![Stephen\_Aylward](https://discourse.itk.org/user_avatar/discourse.itk.org/stephen_aylward/32/654_2.png) [@Stephen\_Aylward](https://discourse.itk.org/u/Stephen_Aylward)\
**Post date:** [February 23, 2022, 12:37pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/11 "2022-02-23T12:37:46Z")

</div>

Hi

Please post this as a new topic thread. I have no experience with vs2022, but I bet others do. Starting another thread will help them see your post and offer solutions.

---

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 23, 2022, 12:42pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/12 "2022-02-23T12:42:16Z")

</div>

I will do, thx a lot

---

<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:** [February 23, 2022, 3:51pm UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/13 "2022-02-23T15:51:21Z")

</div>

To “install” a project into a system location such as `C:\Program Files\` you need to start Visual Studio “as Administrator”. Even if your user is a member of the Administrators group (like mine is).

 ![Screenshot 2022-02-23 10.49.17](https://discourse.itk.org/uploads/default/original/2X/7/774db314507ddd41041e0550f4ffa160817ba719.png)

---

<div class="post-metadata">

**Author:** ![xyz](https://discourse.itk.org/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@xyz](https://discourse.itk.org/u/xyz)\
**Post date:** [February 24, 2022, 9:43am UTC](https://discourse.itk.org/t/itk-install-issues-on-vs2022/4821/14 "2022-02-24T09:43:28Z")

</div>

Thx guys, I have tried several times in win11, eventually succeed in another PC with win10. win11 is trash:), thx a lot for your help.
