Hi Matt,
have you tried to build with the option 'MITK_USE_SYSTEM_PYTHON'
enabled? If you enable this option you'll have to set the
'PYTHON_EXECUTABLE' and 'PYTHON_INCLUDE_DIR' paths in the advance mode
(ccmake).
Regards,
Luis
On 29/09/15 06:03, Clarkson, Matt wrote:
> Hi All,
>
> we just upgraded to 2015.05.2 (yeah… thanks!). Ive been meaning to try the
> python console for ages. But we have a different superbuild and folder
> structure. So, I got our superbuild to build all the dependencies ZLIB, PCRE,
> SWIG, Numpy, Python, SimpleITK, VTK with Python, CTK with Python and MITK
> with Python on. All, no problem, the plugin builds fine. I have also
> separately built the MITK 2015.05.2 release from MITK/master with Python
> console turned on.
>
> In MitkWorkbench, on the Mac Terminal, I run the MitkWorkbench, and
> everything launches, and I can see a Python console. Coooool.
>
> In our app, on the Mac Terminal, I run the app, and the app crashes, with the
> error message: "ImportError: No module named site"
>
> If I remove the python plugin from the provisioning file, our app launches
> but obviously without any Python plugin obviously.
>
> So, when I google around, I set:
>
> export
> PYTHONHOME=/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/
> export
> PYTHONPATH=/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/
>
> Then run our app:
>
> bin/NiftyView.app/Contents/MacOS/NiftyView
> Traceback (most recent call last):
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/site.py",
> line 563, in <module>
> main()
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/site.py",
> line 545, in main
> known_paths = addusersitepackages(known_paths)
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/site.py",
> line 278, in addusersitepackages
> user_site = getusersitepackages()
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/site.py",
> line 253, in getusersitepackages
> user_base = getuserbase() # this will also set USER_BASE
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/site.py",
> line 243, in getuserbase
> USER_BASE = get_config_var('userbase')
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/sysconfig.py",
> line 521, in get_config_var
> return get_config_vars().get(name)
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/sysconfig.py",
> line 420, in get_config_vars
> _init_posix(_CONFIG_VARS)
> File
> "/Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/Python/install/lib/python2.7/sysconfig.py",
> line 288, in _init_posix
> raise IOError(msg)
> IOError: invalid Python installation: unable to open
> /Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/MITK/build/ep/lib/python2.7/config/Makefile
> (No such file or directory)
>
> Can anyone explain this? Why does the build of our app look for a file in the
> MITK/build/ep folder for any config at all? The only things in there are a
> few small libraries, as most of the dependencies we build ourselves before
> passing them to MITK.
>
> ls /Users/mattclarkson/build/NifTK-4338-SuperBuild-Release/MITK/build/ep/lib/
> cmake libPocoUtild.30.dylib
> libannd.1.1.2.dylib libqwtd.6.1.0.dylib
> libPocoFoundationd.1.6.0.dylib libPocoUtild.dylib
> libannd.dylib libqwtd.dylib
> libPocoFoundationd.30.dylib libPocoXMLd.30.dylib
> libcppunitd.1.12.1.dylib libtinyxmld.2.6.2.dylib
> libPocoFoundationd.dylib libPocoXMLd.dylib
> libcppunitd.dylib libtinyxmld.dylib
> libPocoJSONd.30.dylib libPocoZipd.30.dylib
> libglewd.1.10.0.dylib
> libPocoJSONd.dylib libPocoZipd.dylib libglewd.dylib
>
> Thanks
>
> Matt
>
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
--
Luis J. Salvatierra
http://www.ljsalvatierra.com
@Luisja_350
Python San Sebastián - ACPySS
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users