Hi Douglas,

Your system appears to have at least two, and possibly more, competing
installations of Python. Is the Python 2.7 in /usr/local the same as
the one in /usr/bin/tmp? Either way you need to pick a Python
installation and stick with it - I would try the system Python first
of all, which appears to be Python 2.5 in your case. Does your PyMol
use a specific Python installation? - if so, try that one next.

If you "grep PYTHON CMakeCache.txt" you will see which Python has been
found and what the variable names are. Something like "cmake ..
-DPYTHON_INCLUDE_DIR=whatever -DPYTHON_LIBRARY=whatever
-DPYTHON_EXECUTABLE=whatever" (check the variable names) will cover
all of the bases. If this is not clear, let us know.

And as I always say on this list, as a general rule you should not
compile anything as root. This may lead to permissions problems down
the line which will be difficult to diagnose.

Regards,
     Noel

On 14 November 2014 10:05, Douglas Houston <dhous...@staffmail.ed.ac.uk> wrote:
> Hi all,
>
> I am trying to install a Pymol plugin and it requires my Open Babel to
> be re-installed, this time including the Python bindings:
>
> Python 2.5.1 (r251:54863, Sep 21 2007, 11:20:07)
> [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-56)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> import openbabel
> Traceback (most recent call last):   File "<stdin>", line 1, in <module>
> ImportError: No module named openbabel
>
>
> I have tried recompiling Open Babel as root with the Python bindings using:
>
> tar -xvf openbabel-2.3.2.tar.gz
> cd openbabel-2.3.2
> mkdir build
> cd build/
> ~douglas/programs/cmake-2.8.7/bin/cmake  ~/openbabel-2.3.2
> -DPYTHON_BINDINGS=ON
> make -j2
>
>
> but it fails with the following errors; can anyone help?:
>
>
> [100%] Building CXX object
> scripts/CMakeFiles/bindings_python.dir/python/openbabel-python.cpp.o
> Linking CXX executable ../bin/test_unitcell
> [100%] Built target test_unitcell
> Linking CXX shared module ../lib/_openbabel.so
> /usr/local/lib/libpython2.7.a(thread.o): In function
> `_pythread_pthread_set_stacksize':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:497: undefined
> reference to `pthread_attr_setstacksize'
> /usr/local/lib/libpython2.7.a(thread.o): In function `PyThread_release_lock':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:350: undefined
> reference to `sem_post'
> /usr/local/lib/libpython2.7.a(thread.o): In function `PyThread_free_lock':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:294: undefined
> reference to `sem_destroy'
> /usr/local/lib/libpython2.7.a(thread.o): In function `PyThread_allocate_lock':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:269: undefined
> reference to `sem_init'
> /usr/local/lib/libpython2.7.a(thread.o): In function `PyThread_acquire_lock':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:326: undefined
> reference to `sem_trywait'
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:324: undefined
> reference to `sem_wait'
> /usr/local/lib/libpython2.7.a(thread.o): In function
> `PyThread_start_new_thread':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:184: undefined
> reference to `pthread_attr_setstacksize'
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:194: undefined
> reference to `pthread_create'
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:210: undefined
> reference to `pthread_detach'
> /usr/local/lib/libpython2.7.a(thread.o): In function `PyThread_release_lock':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:350: undefined
> reference to `sem_post'
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:350: undefined
> reference to `sem_post'
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:350: undefined
> reference to `sem_post'
> /usr/local/lib/libpython2.7.a(thread.o): In function `PyThread_allocate_lock':
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:269: undefined
> reference to `sem_init'
> /usr/bin/tmp/Python-2.7.6/Python/thread_pthread.h:269: undefined
> reference to `sem_init'
> /usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_forkpty':
> /usr/bin/tmp/Python-2.7.6/./Modules/posixmodule.c:3958: undefined
> reference to `forkpty'
> /usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_openpty':
> /usr/bin/tmp/Python-2.7.6/./Modules/posixmodule.c:3898: undefined
> reference to `openpty'
> collect2: ld returned 1 exit status
> make[2]: *** [lib/_openbabel.so] Error 1
> make[1]: *** [scripts/CMakeFiles/bindings_python.dir/all] Error 2
> make: *** [all] Error 2
>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to