openbabel / conda-openbabel

Conda build recipe for Open Babel
2 stars 4 forks source link

Invalid Openbabel Installation #3

Closed zmbq closed 5 years ago

zmbq commented 5 years ago

I tried the following on Ubuntu 18.04 and centos 7 - both under Docker and on a regular virtual machine. Both with Miniconda 3 latest and Anaconda 3 latest, and always received the same results:

conda create --name env
conda install -c openbabel openbabel

All is well. Then I try obabel -i <pdb filename> or even just babel and get a long list of

*** Open Babel Error  in openLib
  /root/anaconda3/envs/env/lib/openbabel/2.4.1/fastsearchformat.so did not load properly.
 Error: libXrender.so.1: cannot open shared object file: No such file or directory
.
.  I get this once for every *format.so in the Open Babel directory
.
Segmentation fault

When using the Python API to read a file, I get the same errors written to the terminal, and open babel fails to open the file because it doesn't know how to handle PDB files.

trinhsk commented 5 years ago

Hi, I am getting a similar problem when I go into python and type import pybel:

Open Babel Error  in openLib
  /opt/conda/lib/openbabel/2.4.1/fpsformat.so did not load properly.
 Error: libXrender.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.7/site-packages/pybel.py", line 89, in <module>
    informats = _formatstodict(_obconv.GetSupportedInputFormat())
  File "/opt/conda/lib/python3.7/site-packages/pybel.py", line 68, in _formatstodict
 broken = [(x, y.strip()) for x, y in broken]
  File "/opt/conda/lib/python3.7/site-packages/pybel.py", line 68, in <listcomp>
    broken = [(x, y.strip()) for x, y in broken]
ValueError: not enough values to unpack (expected 2, got 1)

I too am running docker image with conda. Would you mind sharing your dockerfile? I couldn't get conda to be set in environment path; I had to explicitly write the whole path.

mwojcikowski commented 5 years ago

You can fix that problem by installing libxrender from conda-forge:

conda install -c conda-forge xorg-libxrender 
amonnio commented 4 years ago

this fix didn't work for me

mcs07 commented 4 years ago

Please install open babel from conda-forge instead of this channel:

conda install -c conda-forge openbabel

And open a new issue at https://github.com/conda-forge/openbabel-feedstock/issues if you still see the problem.