Hi Eric, that was it. Its working now. Thanks
Matt > On 30 Sep 2015, at 13:15, Heim, Eric <e.h...@dkfz-heidelberg.de> wrote: > > Hi Matt, > > The python runtime in MITK loads its dependencies from > MITK-Superbuild/ep/libs/python2.7. > In our setup the compiled python is installed into this folder and the > related site-package folder is in python2.7/site-packages. > These paths are set in the mitkPythonService during compile time with the > PythonPath.h.in header. > When using an installer on the other hand the paths are set during runtime. > In this case python tries to load the site-packages and runtime > In MITK-installer-dir/bin. > > If you want to adopt the python plugin to user your runtime in a different > build tree, changing the paths in the PythonPath.h.in header should do the > trick for you. > > Regards, > Eric > > -----Ursprüngliche Nachricht----- > Von: Clarkson, Matt [mailto:m.clark...@ucl.ac.uk] > Gesendet: Dienstag, 29. September 2015 06:03 > An: MITK > Betreff: [mitk-users] Weird Python console issue > > 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 > mitk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users