FragIt / fragit-main

FragIt main repository
Other
25 stars 12 forks source link

<< OpenBabel error >> #31

Open icamps opened 5 years ago

icamps commented 5 years ago

Hello,

I installed OpenBabel and python-openbabel using apt (Ubuntu 19.04).

The problem is that after installing FragIt, I am getting the following error messages:

Error: OpenBabel could not be loaded. Please make sure OpenBabel has been installed with python bindings.

But Babel and Babel-GUI are working fine when I call them from the command line.

Any idea how to make FragIt to see OpenBabel?

Regards,

cstein commented 5 years ago

Hi @icamps,

I just tried installing openbabel and python-openbabel using apt on a clean Ubuntu 19.04:

apt install openbabel python-openbabel

and afterwards I ran the following from the terminal:

$ python -c "import openbabel; print openbabel"
<module 'openbabel' from '/usr/lib/python2.7/dist-packages/openbabel.pyc'>

So to me it looks like you installed FragIt using python3 on Ubuntu 19.04 and then installed openbabel and python-bindings using apt which defaults to python 2.7. So you need to remove your installation of fragit and reinstall it using python2.7.

all the best

Casper

icamps commented 5 years ago

Hi @cstein

Thank you very much for your help.

I figure out how to install/run Fragit: I added "#!/usr/bin/python" to files /usr/local/bin/fragit-conf and /usr/local/bin/fragit, when I run python, it returns

Python 2.7.16 (default, Apr 6 2019, 01:42:57) [GCC 8.3.0] on linux2

so it is Python 2.7, right?

Now, I am following the steps in the Wiki (How to use Fragit?) but I am getting the following output file (attached) with this message: fragit.out.txt

Traceback (most recent call last): File "/usr/local/bin/fragit", line 26, in main(dirs) File "/usr/local/lib/python2.7/dist-packages/fragit/cmdline.py", line 155, in main out.setup() File "/usr/local/lib/python2.7/dist-packages/fragit/gamessfmo.py", line 99, in setup if self._do_jmol: self._dump_jmol() File "/usr/local/lib/python2.7/dist-packages/fragit/gamessfmo.py", line 148, in _dump_jmol self._writeTemplateFile(pt) File "/usr/local/lib/python2.7/dist-packages/fragit/gamessfmo.py", line 159, in _writeTemplateFile template.override() File "/usr/local/lib/python2.7/dist-packages/fragit/template.py", line 99, in override self.replacements['FRAGMENTQ'] = self.formatFragmentCharges() File "/usr/local/lib/python2.7/dist-packages/fragit/template.py", line 88, in formatFragmentCharges raise NotImplementedError NotImplementedError

It is about OpenBabel?

Also: how can I uninstall FragIt?

Regards,

Camps