installing openbabel3 with pip

1.5k views Asked by At

I tried pip install openbabel --log log_file and I got the following error:

Collecting openbabel
  Using cached openbabel-2.4.1.tar.gz (74 kB)
Building wheels for collected packages: openbabel
  Building wheel for openbabel (setup.py) ... error
  ERROR: Failed building wheel for openbabel
  Running setup.py clean for openbabel
Failed to build openbabel
Installing collected packages: openbabel
    Running setup.py install for openbabel ... error
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-install-d2aqd_xf/openbabel/setup.py'"'"'; __file__='"'"'/private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-install-d2aqd_xf/openbabel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-record-i_0qytcj/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/openbabel Check the logs for full command output.

Here pip is an alias for pip3.

The log file is here (I am not sure if you can read it, this is my first time sharing a file)

note: A few days ago I opened a second user on my computer, I don't know how it affects things but maybe that's the reason.

I am using Mac OS Catalina.

2

There are 2 answers

0
beliz On BEST ANSWER

So I found a much simpler way than building openbabel manually. brew install openbabel works for openbabel3

Check the link: http://openbabel.org/wiki/Category:Installation

0
Jack Rawlins On

From a quick look at the log file it looks like it wont install as it cant find a version for Mac OS, only for Windows, however the following may be useful as a workaround to that: How to Install openbabel for Python 3.6 on macOS Sierra 10.12.3