harryjubb / openbabel_python_docker

Dockerfiles to build OpenBabel with Python bindings
MIT License
1 stars 1 forks source link

Python 3.6.5 OpenBabel build fails due to test fails #1

Open harryjubb opened 6 years ago

harryjubb commented 6 years ago
157/160 Test #157: pytest_pdbformat .................***Failed    0.03 sec
        Start 158: pybindtest_bindings
158/160 Test #158: pybindtest_bindings ..............***Failed  Error regular expression found in output. Regex=[FAIL]  0.23 sec
        Start 159: pybindtest__pybel
159/160 Test #159: pybindtest__pybel ................***Failed    0.11 sec
        Start 160: pybindtest_example
160/160 Test #160: pybindtest_example ...............***Failed  Error regular expression found in output. Regex=[FAIL]  0.10 sec

98% tests passed, 4 tests failed out of 160

Total Test time (real) =  35.07 sec

The following tests FAILED:
        157 - pytest_pdbformat (Failed)
        158 - pybindtest_bindings (Failed)
        159 - pybindtest__pybel (Failed)
        160 - pybindtest_example (Failed)
Errors while running CTest
Makefile:127: recipe for target 'test' failed
make: *** [test] Error 8
The command '/bin/sh -c make test' returned a non-zero code: 2
boegel commented 5 years ago

Seems like these tests are failing for two reasons:

i) tab characters in test/testpdbformat.py, which lead to an error with Python 3.6 ii) broken import DLFCN in scripts/python/openbabel.py, because DLFCN was merged into the os module in Python 3.x

Both problems are fixed with the patch in https://github.com/easybuilders/easybuild-easyconfigs/pull/7614/files#diff-f07033ab146a0de07881b78c27e94845

trinhsk commented 5 years ago

Hi Harry,

I am trying to build this on a python 3.x version. I copied verbatim but I am getting and import error about DLFCN not found. I found this site:

https://bugs.archlinux.org/task/52409 [bugs.archlinux.org]

It builds/tests fine but when I run my code it gives me the import error. If this patch fixes it, how can I implement it? It seems that the newest version of open babel should have already taken care of this fix? I have been trying different things for several hours now and can’t get anywhere. I’m new to docker.

Would you be so kind to provide some assistance? Thanks so much.

Best regards,

Spencer

harryjubb commented 5 years ago

Hi @trinhsk,

It looks like there hasn't been a stable OpenBabel release version covering this fix (the stable version remains the same as in the Dockerfile).

One option to try is changing the Dockerfile to clone the latest development version of OpenBabel and build in there (as per http://openbabel.org/wiki/Git), rather than wgetting the stable release. Then build the image with docker build and see if that version fixes it.

saurabh2804 commented 4 years ago

I was having the same problem. I solved it by simply deactivating the conda environment I was in. conda deactivate