Thanks!
I tried adding the environment variables manually to the .bash_profile and the .profile and at least the import ROOT statement now works.
this is my new .bash_profile:
[code]# .bash_profile
Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin:/usr/local/texlive/2015/bin/x86_64-linux:/home/mmoser/Documents/Programming/root/bin
PYTHONPATH=/home/mmoser/Documents/Programming/root/lib
LD_LIBRARY_PATH=/home/mmoser/Documents/Programming/root/lib
export LD_LIBRARY_PATH
export PYTHONPATH
export PATH[/code]
So importing works now everytime, but if I e.g. create a Canvas
i get errors:
[code]cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TInterpreter::TCling::AutoLoad: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TInterpreter::TCling::AutoLoad: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TGHScrollBar::TGHScrollBar: arrow_.xpm not found
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TInterpreter::TCling::AutoLoad: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TInterpreter::TCling::AutoLoad: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TGVScrollBar::TGVScrollBar: arrow_.xpm not found
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
Error in TInterpreter::TCling::AutoLoad: failure loading library libASImage.so for TASImage
cling::DynamicLibraryManager::loadLibrary(): libpng12.so.0: cannot open shared object file: No such file or directory
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
Thread 2 (Thread 0x7fbfe9436700 (LWP 5599)):
#0 0x00007fbffed9b790 in sem_wait () from /lib64/libpthread.so.0
#1 0x00007fbfff0b67b5 in PyThread_acquire_lock () from /lib64/libpython2.7.so.1.0
#2 0x00007fbfff0858a6 in PyEval_RestoreThread () from /lib64/libpython2.7.so.1.0
#3 0x00007fbfe9439086 in time_sleep () from /usr/lib64/python2.7/lib-dynload/timemodule.so
#4 0x00007fbfff08aaa4 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#5 0x00007fbfff08c0bd in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#6 0x00007fbfff01905d in function_call () from /lib64/libpython2.7.so.1.0
#7 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#8 0x00007fbfff0872f7 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#9 0x00007fbfff08a860 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#10 0x00007fbfff08a860 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#11 0x00007fbfff08c0bd in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#12 0x00007fbfff018f68 in function_call () from /lib64/libpython2.7.so.1.0
#13 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#14 0x00007fbfff0030a5 in instancemethod_call () from /lib64/libpython2.7.so.1.0
#15 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#16 0x00007fbfff085f07 in PyEval_CallObjectWithKeywords () from /lib64/libpython2.7.so.1.0
#17 0x00007fbfff0ba842 in t_bootstrap () from /lib64/libpython2.7.so.1.0
#18 0x00007fbffed95dc5 in start_thread () from /lib64/libpthread.so.0
#19 0x00007fbffe3ba28d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7fbfff578740 (LWP 5582)):
#0 0x00007fbffe3810f9 in waitpid () from /lib64/libc.so.6
#1 0x00007fbffe306092 in do_system () from /lib64/libc.so.6
#2 0x00007fbffe306441 in system () from /lib64/libc.so.6
#3 0x00007fbff758e0cf in TUnixSystem::StackTrace() () from /home/mmoser/Documents/Programming/root/lib/libCore.so
#4 0x00007fbff758fc4c in TUnixSystem::DispatchSignals(ESignals) () from /home/mmoser/Documents/Programming/root/lib/libCore.so
#5
#6 0x00007fbfe2362ffe in TGHScrollBar::SetPosition(int) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#7 0x00007fbfe233e8f8 in TGCanvas::Layout() () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#8 0x00007fbfe2305cd4 in TGCompositeFrame::MapSubwindows() () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#9 0x00007fbfe2305cd4 in TGCompositeFrame::MapSubwindows() () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#10 0x00007fbfe239c455 in TRootCanvas::CreateCanvas(char const*) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#11 0x00007fbfe239f7a1 in TRootCanvas::TRootCanvas(TCanvas*, char const*, unsigned int, unsigned int) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#12 0x00007fbfe234d8fb in TRootGuiFactory::CreateCanvasImp(TCanvas*, char const*, unsigned int, unsigned int) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#13 0x00007fbfe87cbedb in TCanvas::Constructor(char const*, char const*, int, int) () from /home/mmoser/Documents/Programming/root/lib/libGpad.so
#14 0x00007fbfe87ccdec in TCanvas::TCanvas(char const*, char const*, int, int) () from /home/mmoser/Documents/Programming/root/lib/libGpad.so
#15 0x00007fbfff4f308e in ?? ()
#16 0x00007ffe457f0a10 in ?? ()
#17 0x00007fbff16c6a94 in TClingCallFunc::IFacePtr() () from /home/mmoser/Documents/Programming/root/lib/libCling.so
#18 0x000000000000006c in ?? ()
#19 0x00007ffe457f050f in ?? ()
#20 0x00007fbff793a061 in FastCall(long, void*, void*, void*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#21 0x00007fbff793ad4c in Cppyy::CallConstructor(long, long, void*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#22 0x00007fbff7963a63 in PyROOT::TConstructorExecutor::Execute(long, void*, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#23 0x00007fbff7936c69 in PyROOT::TMethodHolder::CallSafe(void*, long, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#24 0x00007fbff7935509 in PyROOT::TMethodHolder::Execute(void*, long, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#25 0x00007fbff795a780 in PyROOT::TConstructorHolder::Call(PyROOT::ObjectProxy*&, _object*, _object*, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#26 0x00007fbff794a9c0 in PyROOT::(anonymous namespace)::mp_call(PyROOT::MethodProxy*, _object*, _object*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#27 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#28 0x00007fbfff04b057 in slot_tp_init () from /lib64/libpython2.7.so.1.0
#29 0x00007fbfff049d6f in type_call () from /lib64/libpython2.7.so.1.0
#30 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#31 0x00007fbfff08825c in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#32 0x00007fbfff08c0bd in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#33 0x00007fbfff08c1c2 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
#34 0x00007fbfff0a55ff in run_mod () from /lib64/libpython2.7.so.1.0
#35 0x00007fbfff0a67be in PyRun_FileExFlags () from /lib64/libpython2.7.so.1.0
#36 0x00007fbfff0a7a49 in PyRun_SimpleFileExFlags () from /lib64/libpython2.7.so.1.0
#37 0x00007fbfff0b8b9f in Py_Main () from /lib64/libpython2.7.so.1.0
#38 0x00007fbffe2e5b15 in __libc_start_main () from /lib64/libc.so.6
#39 0x0000000000400721 in _start ()
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
#6 0x00007fbfe2362ffe in TGHScrollBar::SetPosition(int) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#7 0x00007fbfe233e8f8 in TGCanvas::Layout() () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#8 0x00007fbfe2305cd4 in TGCompositeFrame::MapSubwindows() () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#9 0x00007fbfe2305cd4 in TGCompositeFrame::MapSubwindows() () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#10 0x00007fbfe239c455 in TRootCanvas::CreateCanvas(char const*) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#11 0x00007fbfe239f7a1 in TRootCanvas::TRootCanvas(TCanvas*, char const*, unsigned int, unsigned int) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#12 0x00007fbfe234d8fb in TRootGuiFactory::CreateCanvasImp(TCanvas*, char const*, unsigned int, unsigned int) () from /home/mmoser/Documents/Programming/root/lib/libGui.so
#13 0x00007fbfe87cbedb in TCanvas::Constructor(char const*, char const*, int, int) () from /home/mmoser/Documents/Programming/root/lib/libGpad.so
#14 0x00007fbfe87ccdec in TCanvas::TCanvas(char const*, char const*, int, int) () from /home/mmoser/Documents/Programming/root/lib/libGpad.so
#15 0x00007fbfff4f308e in ?? ()
#16 0x00007ffe457f0a10 in ?? ()
#17 0x00007fbff16c6a94 in TClingCallFunc::IFacePtr() () from /home/mmoser/Documents/Programming/root/lib/libCling.so
#18 0x000000000000006c in ?? ()
#19 0x00007ffe457f050f in ?? ()
#20 0x00007fbff793a061 in FastCall(long, void*, void*, void*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#21 0x00007fbff793ad4c in Cppyy::CallConstructor(long, long, void*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#22 0x00007fbff7963a63 in PyROOT::TConstructorExecutor::Execute(long, void*, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#23 0x00007fbff7936c69 in PyROOT::TMethodHolder::CallSafe(void*, long, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#24 0x00007fbff7935509 in PyROOT::TMethodHolder::Execute(void*, long, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#25 0x00007fbff795a780 in PyROOT::TConstructorHolder::Call(PyROOT::ObjectProxy*&, _object*, _object*, PyROOT::TCallContext*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#26 0x00007fbff794a9c0 in PyROOT::(anonymous namespace)::mp_call(PyROOT::MethodProxy*, _object*, _object*) () from /home/mmoser/Documents/Programming/root/lib/libPyROOT.so
#27 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#28 0x00007fbfff04b057 in slot_tp_init () from /lib64/libpython2.7.so.1.0
#29 0x00007fbfff049d6f in type_call () from /lib64/libpython2.7.so.1.0
#30 0x00007fbffeff40b3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#31 0x00007fbfff08825c in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#32 0x00007fbfff08c0bd in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#33 0x00007fbfff08c1c2 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0
#34 0x00007fbfff0a55ff in run_mod () from /lib64/libpython2.7.so.1.0
#35 0x00007fbfff0a67be in PyRun_FileExFlags () from /lib64/libpython2.7.so.1.0
#36 0x00007fbfff0a7a49 in PyRun_SimpleFileExFlags () from /lib64/libpython2.7.so.1.0
#37 0x00007fbfff0b8b9f in Py_Main () from /lib64/libpython2.7.so.1.0
#38 0x00007fbffe2e5b15 in __libc_start_main () from /lib64/libc.so.6
#39 0x0000000000400721 in _start ()
Traceback (most recent call last):
File “/home/mmoser/PycharmProjects/General/TestSetup.py”, line 6, in
canvas = ROOT.TCanvas(‘w’,‘r’,600,900)
TypeError: none of the 5 overloaded methods succeeded. Full details:
TCanvas::TCanvas(bool build = kTRUE) =>
takes at most 1 arguments (4 given)
TCanvas::TCanvas(const char* name, const char* title = “”, int form = 1) =>
takes at most 3 arguments (4 given)
TCanvas::TCanvas(const char* name, const char* title, int ww, int wh) =>
problem in C++; program state has been reset
TCanvas::TCanvas(const char* name, const char* title, int wtopx, int wtopy, int ww, int wh) =>
takes at least 6 arguments (4 given)
TCanvas::TCanvas(const char* name, int ww, int wh, int winid) =>
could not convert argument 2[/code]
Looks like some paths are still missing because files can’t be found?
Or has the canvas method been changed from Root 5.34 to 6 (I don’t think so)?
Thanks for your help!