Hello
I want to check the compatibility of ROOT with the Python. The version of ROOT is 5.30 and the PYTHON is 2.7.3. I check them by in a shell the commands
root-config --has-python
The result is
no
What can I do?
Best wishes
violin
Hello
I want to check the compatibility of ROOT with the Python. The version of ROOT is 5.30 and the PYTHON is 2.7.3. I check them by in a shell the commands
root-config --has-python
The result is
no
What can I do?
Best wishes
violin
[url]Import ROOT error
[url]PyROOT and Ubuntu 12.04
[url]Installation succeeds but root doesn't start
[quote=“Pepe Le Pew”][url]Import ROOT error
[url]PyROOT and Ubuntu 12.04
[url]Installation succeeds but root doesn’t start
Hi
I have installed root3.50,
./configure --enable-python --prefix=/home/…/root5.30
make
make install
Then I add “PATH=/home/…/root5.30:$PATH” in .bashrc.
But it still doesn’t work now. I enter root -config --has-python. The result is no.
I installed python2.7.3 in my computer. I set the PATH in .bashrc.
I dont know why root has no python.
Thanks for you help
Best withes
violin
http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch28s05.html
http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch19.html#d5e27343
[quote=“Pepe Le Pew”]http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch28s05.html
http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch19.html#d5e27343[/quote]
Hi:
I’m so sorry to waste your time. I am not good at the program.
I have installed ROOT, it can work. But I still have problem. When I entered “root-config --has-python” , the result is “no”. And I didn’t find libpyroot.so in root directory.
Then I installed python2.7.3 again. But I didnt find $PYTHONPATH,$PYTHONDIR in .bashrc. And I entered
"echo $PYTHONPATH "“echo $PYTHONDIR”, there is no result. I added $PYTHONPATH,$PYTHONDIR in .bashrc by myself:
export PYTHONDIR=/usr/local — the file has /bin and /lib (the lib have libpython2.7.a ,python2.7 , pkgconfig)
export PATH=$ROOTSYS/bin:$PYTHONDIR/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/usr/local/include/python2.7 ------ the file has many header files including python.h
export PYTHONPATH=$ROOTSYS/bin:$PYTHONPATH
I installed root again. But I have the follow problem:
/usr/local/lib/libpython2.7.a(thread.o): In function PyThread_start_new_thread': /usr/local/Python-2.7.3/Python/thread_pthread.h:193: undefined reference to
pthread_create’
/usr/local/Python-2.7.3/Python/thread_pthread.h:209: undefined reference to pthread_detach' /usr/local/Python-2.7.3/Python/thread_pthread.h:183: undefined reference to
pthread_attr_setstacksize’
/usr/local/lib/libpython2.7.a(thread.o): In function PyThread_allocate_lock': /usr/local/Python-2.7.3/Python/thread_pthread.h:268: undefined reference to
sem_init’
/usr/local/lib/libpython2.7.a(thread.o): In function PyThread_free_lock': /usr/local/Python-2.7.3/Python/thread_pthread.h:292: undefined reference to
sem_destroy’
/usr/local/lib/libpython2.7.a(thread.o): In function PyThread_acquire_lock': /usr/local/Python-2.7.3/Python/thread_pthread.h:323: undefined reference to
sem_trywait’
/usr/local/Python-2.7.3/Python/thread_pthread.h:321: undefined reference to sem_wait' /usr/local/lib/libpython2.7.a(thread.o): In function
PyThread_release_lock’:
/usr/local/Python-2.7.3/Python/thread_pthread.h:346: undefined reference to sem_post' /usr/local/lib/libpython2.7.a(thread.o): In function
_pythread_pthread_set_stacksize’:
/usr/local/Python-2.7.3/Python/thread_pthread.h:491: undefined reference to pthread_attr_setstacksize' /usr/local/lib/libpython2.7.a(posixmodule.o): In function
posix_openpty’:
/usr/local/Python-2.7.3/./Modules/posixmodule.c:3756: undefined reference to openpty' /usr/local/lib/libpython2.7.a(posixmodule.o): In function
posix_forkpty’:
/usr/local/Python-2.7.3/./Modules/posixmodule.c:3816: undefined reference to `forkpty’
collect2: ld back 1
make: *** [lib/libPyROOT.so] error 1
I’m going crazy. I really dont know what to do.
Thank you very much.
Best wishes
violin
The name “/usr/local/lib/libpython2.7.a” (the archive library that is used) suggests that you do not have the python shared library installed (i.e. the corresponding “libpython2.7.so” file is missing).
If this is the case, you probably need to configure and build your python adding the “–enable-shared” flag.
Then you need to configure and build your ROOT from scratch again also adding the “–enable-shared” flag.
[quote=“Pepe Le Pew”]The name “/usr/local/lib/libpython2.7.a” (the archive library that is used) suggests that you do not have the python shared library installed (i.e. the corresponding “libpython2.7.so” file is missing).
If this is the case, you probably need to configure and build your python adding the “–enable-shared” flag.
Then you need to configure and build your ROOT from scratch again also adding the “–enable-shared” flag.[/quote]
Thank you very much! I have succeed to install root with python. My problem is that I didn’t add the “–enable-shared” building my ROOT, though I installed the python adding the “–enable-shared”.
Thanks for your time again
violin