# super build simpleitk python wrapping link error

**URL:** <https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126>\
**Category:** Uncategorized\
**Created:** [May 28, 2020, 7:21am UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126 "2020-05-28T07:21:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sag](https://discourse.itk.org/user_avatar/discourse.itk.org/sag/32/2041_2.png) [@sag](https://discourse.itk.org/u/sag)\
**Post date:** [May 28, 2020, 7:21am UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126/1 "2020-05-28T07:21:25Z")

</div>

hi all,  
I have managed to super build simplitk for java, csharp I guess!? but when it gets to swig python wrapping code generation at linking time I get link error because super build has discovered a python37.lib x86 library in following path\>  
c:/users/sohrab/appdata/programs/python/python37-32/libs/python37.lib  
I am sure that this is a x86 library, I build debug, x64 in vs2019 which I am sure causing this problem.  
I initially had installed several years ago anaconda3 which was a big chance of 20G and I then discovered I have three other libraries which are suitable for super build but they are not discovered by super build simpleitk, I did only build python part with adding dependencies : \_tkinter.lib, python3.lib, python37.lib I could resolve those link errors for python wrapping.  
yesterday I did uninstall anaconda3 and I had already my miniconda3 installed , I assumed this will remove the python37.lib/x86 as well so super build simpleitk won’t pickup that as link path for python libraries in wrapping python, but then I found out I got the same link errors!?  
is there any way I can force super build to pick these libraries with some -D flag in super build to resolve this issue?

or any suggestion why after anaconda3 is uninstalled still I see this library getting pickup for linking?

what to do?  
good new is that now I have java/csharp wrapping there but python wrapping still not working!

thanks in advance  
sag

---

<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:** [May 28, 2020, 11:28am UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126/2 "2020-05-28T11:28:27Z")

</div>

If there is no option to uninstall that instance of python, just deleting its folder from disk should do the trick.

---

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [May 28, 2020, 12:27pm UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126/3 "2020-05-28T12:27:46Z")

</div>

> [@sag](#):
>
> is there any way I can force super build to pick these libraries with some -D flag in super build to resolve this issue?

The easiest way would be to use the CMake GUI to inspect and correct the PYTHON related variables: **PYTHON** \_EXECUTABLE **PYTHON** \_INCLUDE\_DIR **PYTHON** \_LIBRARY

Alternatively, you could use ( or look at the configuration of the ) the SimpleITK Conda build recipe: [GitHub - SimpleITK/SimpleITKCondaRecipe: A Conda recipe for build SimpleITK for the Anaconda Python distribution.](https://github.com/SimpleITK/SimpleITKCondaRecipe)

---

<div class="post-metadata">

**Author:** ![sag](https://discourse.itk.org/user_avatar/discourse.itk.org/sag/32/2041_2.png) [@sag](https://discourse.itk.org/u/sag)\
**Post date:** [June 2, 2020, 1:33pm UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126/4 "2020-06-02T13:33:23Z")

</div>

Thank you for your attention I finally got it to work!

Regards,  
sag

---

<div class="post-metadata">

**Author:** ![sag](https://discourse.itk.org/user_avatar/discourse.itk.org/sag/32/2041_2.png) [@sag](https://discourse.itk.org/u/sag)\
**Post date:** [June 2, 2020, 1:34pm UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126/5 "2020-06-02T13:34:40Z")

</div>

hi @dzenanz,

I Firstly appreciate your attention to this matter and yes I got it to worked for everything like I announced on the forum site.

Regards,  
sag

---

<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:** [August 25, 2021, 4:12pm UTC](https://discourse.itk.org/t/super-build-simpleitk-python-wrapping-link-error/3126/6 "2021-08-25T16:12:46Z")

</div>

Split this topic on August 25, 2021, 4:12pm UTC

5 posts were split to a new topic: [SimpleElastix build issues](https://discourse.itk.org/t/simpleelastix-build-issues/4364)
