Thanks Matt, that is indeed the problem:

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 with the Python bindings but it  
fails with (and I realise this is no longer a Pymol problem  so I will  
get on to the Open Babel mailing list):

[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



Quoting Matthew Baumgartner <mp...@pitt.edu> on Wed, 12 Nov 2014  
08:55:27 -0500:

> Hi,
> Can you check to see if the python bindings are compiled openbabel?
>
> On the bash command line, run the command 'python' to get an interactive
> shell and then run 'import openbabel'.
>
> Matt
>
> On 11/12/2014 07:14 AM, Douglas Houston wrote:
>> Hi all,
>>
>> I installed Optimize.py, now when I start Pymol I see:
>>
>> "Optimize plug-in needs openbabel to be installed in your system,
>> please follow the instructions at
>> http://openbabel.org/wiki/Get_Open_Babel";
>>
>> If I try to use any optimize commands I get:
>>
>> "PyMOL>minimize all, nsteps 2
>> Traceback (most recent call last):
>>     File
>> "/usr/people/douglas/programs/pymol-v1.7.2.3/modules/pymol/parser.py",
>> line 254, in parse
>>       self.result=apply(layer.kw[0],layer.args,layer.kw_args)
>>     File
>> "/usr/people/douglas/programs/pymol-v1.7.2.3/modules/pmg_tk/startup/optimize.py",
>>  line 237,  
>> in
>> minimize
>>       obconversion = ob.OBConversion()
>> NameError: global name 'ob' is not defined
>> "
>>
>> Open Babel IS installed on my system (v2.3.2), do I need to tell  
>> Pymol where?
>>
>> cheers,
>> Doug
>>
>>
>
>
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>
>




_____________________________________________________
Dr. Douglas R. Houston
Lecturer
Institute of Structural and Molecular Biology
Room 3.23, Michael Swann Building
King's Buildings
University of Edinburgh
Edinburgh, EH9 3JR, UK
Tel. 0131 650 7358
http://tinyurl.com/douglasrhouston

-- 
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
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to