Discussion:
[mitk-users] Issues building MITK using Python
Jernej Finžgar
2017-05-28 15:07:54 UTC
Permalink
Hello,

I have encountered some issues whule trying to build MITK using Python
(2.7) on Windows, using Visual Studio 14 (win64). Here is the error list
(image: https://image.prntscr.com/image/27c9f249292b4b9a85b544eb2cf48181.png
). While trying to perform the same thing on another device I also received
a number of "unresolved external symbols" errors. It should be noted that I
have managed to successfully build MITK before I decided that I need
Python, so the problem probably stems from my inclusion of Python. Thanks
in advance!

Jernej
Dinkelacker, Stefan
2017-05-29 08:01:13 UTC
Permalink
?Hi,


as far as I know, MITK with Python doesn't work in Debug configuration. Try the Release configuration instead. By the way, the kind of errors you have ("cmd exited with code 1") is most probably CMake. Double click on such a line in the error window and then switch to the output window, where you will see the true error (sometimes you need to scroll up a little to crawl through the output of CMake.


Best,

Stefan

________________________________
Von: Jernej Finžgar <***@gmail.com>
Gesendet: Sonntag, 28. Mai 2017 17:07
An: mitk-***@lists.sourceforge.net
Betreff: [mitk-users] Issues building MITK using Python

Hello,

I have encountered some issues whule trying to build MITK using Python (2.7) on Windows, using Visual Studio 14 (win64). Here is the error list (image: https://image.prntscr.com/image/27c9f249292b4b9a85b544eb2cf48181.png ). While trying to perform the same thing on another device I also received a number of "unresolved external symbols" errors. It should be noted that I have managed to successfully build MITK before I decided that I need Python, so the problem probably stems from my inclusion of Python. Thanks in advance!

Jernej
Jernej Finžgar
2017-06-04 15:57:52 UTC
Permalink
Hello again,

could you please direct me on how to successfully use the patch issued for
this problem: https://phabricator.mitk.org/T22591. Thanks!

Jernej

2017-05-29 10:01 GMT+02:00 Dinkelacker, Stefan <
***@dkfz-heidelberg.de>:

> ​Hi,
>
>
> as far as I know, MITK with Python doesn't work in Debug configuration.
> Try the Release configuration instead. By the way, the kind of errors you
> have ("cmd exited with code 1") is most probably CMake. Double click on
> such a line in the error window and then switch to the output window, where
> you will see the true error (sometimes you need to scroll up a little to
> crawl through the output of CMake.
>
>
> Best,
>
> Stefan
> ------------------------------
> *Von:* Jernej FinÅŸgar <***@gmail.com>
> *Gesendet:* Sonntag, 28. Mai 2017 17:07
> *An:* mitk-***@lists.sourceforge.net
> *Betreff:* [mitk-users] Issues building MITK using Python
>
> Hello,
>
> I have encountered some issues whule trying to build MITK using Python
> (2.7) on Windows, using Visual Studio 14 (win64). Here is the error list
> (image: https://image.prntscr.com/image/27c9f249292b4b9a85b5
> 44eb2cf48181.png ). While trying to perform the same thing on another
> device I also received a number of "unresolved external symbols" errors. It
> should be noted that I have managed to successfully build MITK before I
> decided that I need Python, so the problem probably stems from my inclusion
> of Python. Thanks in advance!
>
> Jernej
>
Dinkelacker, Stefan
2017-06-06 07:49:37 UTC
Permalink
Hi,


as long as we didn't apply and merge the patch, you can do it with git apply [1] or git am [2].


Best,

Stefan


[1] https://git-scm.com/docs/git-apply

[2] https://git-scm.com/docs/git-am?


________________________________
Von: Jernej Finžgar <***@gmail.com>
Gesendet: Sonntag, 4. Juni 2017 17:57
An: mitk-***@lists.sourceforge.net
Betreff: Re: [mitk-users] Issues building MITK using Python

Hello again,

could you please direct me on how to successfully use the patch issued for this problem: https://phabricator.mitk.org/T22591. Thanks!

Jernej

2017-05-29 10:01 GMT+02:00 Dinkelacker, Stefan <***@dkfz-heidelberg.de<mailto:***@dkfz-heidelberg.de>>:

?Hi,


as far as I know, MITK with Python doesn't work in Debug configuration. Try the Release configuration instead. By the way, the kind of errors you have ("cmd exited with code 1") is most probably CMake. Double click on such a line in the error window and then switch to the output window, where you will see the true error (sometimes you need to scroll up a little to crawl through the output of CMake.


Best,

Stefan

________________________________
Von: Jernej Finžgar <***@gmail.com<mailto:***@gmail.com>>
Gesendet: Sonntag, 28. Mai 2017 17:07
An: mitk-***@lists.sourceforge.net<mailto:mitk-***@lists.sourceforge.net>
Betreff: [mitk-users] Issues building MITK using Python

Hello,

I have encountered some issues whule trying to build MITK using Python (2.7) on Windows, using Visual Studio 14 (win64). Here is the error list (image: https://image.prntscr.com/image/27c9f249292b4b9a85b544eb2cf48181.png ). While trying to perform the same thing on another device I also received a number of "unresolved external symbols" errors. It should be noted that I have managed to successfully build MITK before I decided that I need Python, so the problem probably stems from my inclusion of Python. Thanks in advance!

Jernej
Aurélien Labrosse
2017-06-12 21:52:20 UTC
Permalink
Hello Jernej,


As Stefan said you can apply the patch with dedicated tools, or also
edit CMakeExternals/SimpleITK.cmake by hand :


* Go around line 110 and search "if( MITK_USE_SYSTEM_PYTHON )"


* Below the "if", replace


ExternalProject_Add_Step(${proj} sitk_python_install_step
COMMAND PYTHONUSERBASE=${_install_dir} ${PYTHON_EXECUTABLE}
setup.py install --prefix=${_install_dir}
DEPENDEES install
WORKING_DIRECTORY ${_sitk_build_dir}/Wrapping/PythonPackage
)


by

if(WIN32)
# if environment variable PYTHONUSERBASE does not
# contain ${_install_dir}, installation here will fail.
ExternalProject_Add_Step(${proj} sitk_python_install_step
COMMAND ${PYTHON_EXECUTABLE} setup.py install
--prefix=${_install_dir}
DEPENDEES install
WORKING_DIRECTORY ${_sitk_build_dir}/Wrapping/PythonPackage)
else()
ExternalProject_Add_Step(${proj} sitk_python_install_step
COMMAND PYTHONUSERBASE=${_install_dir} ${PYTHON_EXECUTABLE}
setup.py install --prefix=${_install_dir}
DEPENDEES install
WORKING_DIRECTORY ${_sitk_build_dir}/Wrapping/PythonPackage)
endif()


And you're done. Don't forget to set the environment variable
'PYTHONPATH' to [mitk compilation folder]\ep\Lib\site-packages\ *before*
initial CMake call.


Regards,


Le 06/06/2017 à 09:49, Dinkelacker, Stefan a écrit :
>
> Hi,
>
>
> as long as we didn't apply and merge the patch, you can do it with git
> apply [1] or git am [2].
>
>
> Best,
>
> Stefan
>
>
> [1] https://git-scm.com/docs/git-apply
>
> [2] https://git-scm.com/docs/git-am​
>
>
> ------------------------------------------------------------------------
> *Von:* Jernej FinÅŸgar <***@gmail.com>
> *Gesendet:* Sonntag, 4. Juni 2017 17:57
> *An:* mitk-***@lists.sourceforge.net
> *Betreff:* Re: [mitk-users] Issues building MITK using Python
> Hello again,
>
> could you please direct me on how to successfully use the patch issued
> for this problem: https://phabricator.mitk.org/T22591. Thanks!
>
> Jernej
>
> 2017-05-29 10:01 GMT+02:00 Dinkelacker, Stefan
> <***@dkfz-heidelberg.de
> <mailto:***@dkfz-heidelberg.de>>:
>
> ​Hi,
>
>
> as far as I know, MITK with Python doesn't work in Debug
> configuration. Try the Release configuration instead. By the way,
> the kind of errors you have ("cmd exited with code 1") is most
> probably CMake. Double click on such a line in the error
> window and then switch to the output window, where you will see
> the true error (sometimes you need to scroll up a little to crawl
> through the output of CMake.
>
>
> Best,
>
> Stefan
>
> ------------------------------------------------------------------------
> *Von:* Jernej FinÅŸgar <***@gmail.com
> <mailto:***@gmail.com>>
> *Gesendet:* Sonntag, 28. Mai 2017 17:07
> *An:* mitk-***@lists.sourceforge.net
> <mailto:mitk-***@lists.sourceforge.net>
> *Betreff:* [mitk-users] Issues building MITK using Python
> Hello,
>
> I have encountered some issues whule trying to build MITK using
> Python (2.7) on Windows, using Visual Studio 14 (win64). Here is
> the error list (image:
> https://image.prntscr.com/image/27c9f249292b4b9a85b544eb2cf48181.png
> <https://image.prntscr.com/image/27c9f249292b4b9a85b544eb2cf48181.png>
> ). While trying to perform the same thing on another device I also
> received a number of "unresolved external symbols" errors. It
> should be noted that I have managed to successfully build MITK
> before I decided that I need Python, so the problem probably stems
> from my inclusion of Python. Thanks in advance!
>
> Jernej
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> mitk-users mailing list
> mitk-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users

--
Pollen Metrology
Pollen Metrology

Aurélien Labrosse
Co Founder - VP of product and Engineering
9 rue du Rocher de Lorzier – 38430 Moirans – France
Office: +33 (0)476657121

www.pollen-metrology.com <http://www.pollen-metrology.com/> youtube
<https://www.youtube.com/watch?v=pCj_L4ucxGk>linked-in
<https://www.linkedin.com/company/pollen-technology>
Loading...