Closed lesterpjy closed 6 years ago
Adding to this _ I ran the brew install with the debug flag
[ 14%] Built target RDGeometryLib
make[1]: *** [Code/DataStructs/Wrap/CMakeFiles/cDataStructs.dir/all] Error 2
make: *** [all] Error 2
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'```
Installing with --verbose --debug
gives the full error: 'boost/python/numeric.hpp' file not found
.
In the release notes for boost 1.65.1 it says:
The boost::python::numeric API has been removed, as it is being obsoleted by boost::python::numpy.
So in the long term, it seems RDKit will have to be updated to handle both the numeric and the numpy API.
But for now, it would be nice to be able to force homebrew to use an older version of boost. I don't think it's possible to use the older versioned formulae that are kept around in homebrew-core (like boost@1.59
) because they are "keg-only", i.e. they aren't linked into /usr/local/lib
etc. so "boost" and "boost-python" are in two separate places and RDKit can't compile against them.
So the only way I can think of is to revert the main formulae to an older version. This means replacing the file at /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/boost.rb
with
https://github.com/Homebrew/homebrew-core/blob/3df9cdfc25f796ec8d3ffd0a0a12476cf6d413d5/Formula/boost.rb
And replacing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/boost-python.rb
with
https://github.com/Homebrew/homebrew-core/blob/d22f78c56a1c7d8e711a407c2dae5fc42f4ae6c2/Formula/boost-python.rb
Then, after you brew uninstall boost boost-python
to get rid of the 1.65 versions, RDKit seems to install fine.
I had previous versions of boost
and boost-python
installed, so this worked for me:
brew switch boost 1.63.0
brew switch boost-python 1.63.0
brew install rdkit --with-python3
You can find your installed versions using brew info boost boost-python
I met the same bug and got the follow errors:
In file included from /usr/local/include/boost/python/detail/prefix.hpp:13:
/usr/local/include/boost/python/detail/wrap_python.hpp:50:11: fatal error: 'pyconfig.h' file not found
# include <pyconfig.h>
....
I also tried @mcs07 's method to replace boost to v1.64. But it show the same errors.
I have the same issue. Tried the manual fix proposed by mcs07 but the install helpfully overwrites with 1.65 so I'm back where I started!
It works for boost 1.64.0_1
and 1.64.0
for me.
@platinhom I think it's different issue. I think your issue should be your python installation.
@timjmiller1 try this without updating those dependencies.
For those who seek a answer of this issue. I have another answer:
brew uninstall boost boost-python # if you have already install boost and boost-python
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/3df9cdfc25f796ec8d3ffd0a0a12476cf6d413d5/Formula/boost.rb # install boost
brew install https://gist.githubusercontent.com/hsiaoyi0504/cd136fb266f917a85261b946df2f4c6f/raw/89fa69777f7d3766886dcfe3abf9fa539a25e047/boost-python.rb --with-python3 # install boost-python
brew install https://gist.githubusercontent.com/hsiaoyi0504/cd136fb266f917a85261b946df2f4c6f/raw/081ab1509071d0f509ab996c4a67935fdfc79d2e/rdkit.rb --with-python3 --without-numpy" # install rdkit
It has been tested on travis-ci.
This scripts I specified in brew install
is almost the same the @mcs07 said. It's a great solution. However, as mentioned by @timjmiller1, homebrew
will automatically install up-to-date dependencies. It need to remove some dependencies (that's what I did further based on @mcs07's answer) or disable such kind of functionality through this.
@greglandrum @mcs07 FYI and also I think it would be good to integrate travis
to test the build based on homebrew
in the future.
This issue should be reopened: the rdkit formula in brew doesn't work. The formula should be fixed. Can't a brew formula specify some version constraints on dependencies? I understand that we are incompatible with boost starting from boost-1.65. Or should everybody use: brew install rdkit --HEAD? Can't the formula say so if this is the case?
@UnixJunkie Do you have further information on your claim ? Log message and detailed information are helpful on this. I can build the rdkit on Travis almost one month ago. https://travis-ci.org/hsiaoyi0504/homebrew-rdkit/builds/303879181
I had this same error:
Installing with --verbose --debug gives the full error: 'boost/python/numeric.hpp' file not found.
@UnixJunkie Can you give me the output you will get through brew info boost
and brew info boost-python
? If you can describe how you install them more clearly , we can probably help you more sooner.
brew automatically reinstalls boost 1.66, even if I had 1.59 installed. The trick described above does not seem to work for me:
$ HOMEBREW_NO_AUTO_UPDATE=1 brew install rdkit
==> Installing rdkit from rdkit/rdkit
==> Installing dependencies for rdkit/rdkit/rdkit: boost, boost-python
==> Installing rdkit/rdkit/rdkit dependency: boost
==> Downloading https://homebrew.bintray.com/bottles/boost-1.66.0.high_sierra.bottle.tar.gz
Already downloaded: /Users/b/Library/Caches/Homebrew/boost-1.66.0.high_sierra.bottle.tar.gz
==> Pouring boost-1.66.0.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/boost/1.66.0: 13,101 files, 435.2MB
==> Installing rdkit/rdkit/rdkit dependency: boost-python
==> Downloading https://homebrew.bintray.com/bottles/boost-python-1.66.0_1.high_sierra.bottle.tar.gz
Already downloaded: /Users/b/Library/Caches/Homebrew/boost-python-1.66.0_1.high_sierra.bottle.tar.gz
==> Pouring boost-python-1.66.0_1.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/boost-python/1.66.0_1: 457 files, 17.3MB
Any ideas?
@BastiaanBergman Can you give me your output of following two commands?
brew info boost
and brew search boost
@hsiaoyi0504
brew info boost
boost: stable 1.66.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.66.0 (13,101 files, 435.2MB) *
Poured from bottle on 2018-03-10 at 22:29:58
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ✔
==> Options
--with-icu4c
Build regexp engine with icu support
--without-single
Disable building single-threading variant
--without-static
Disable building static library variant
--HEAD
Install HEAD version
brew search boost
==> Searching local taps...
boost ✔ boost-python@1.59 ✔ boost-bcp boost-mpi boost@1.55 boost@1.60
boost-python ✔ boost@1.59 ✔ boost-build boost-python3 boost@1.57
==> Searching taps on GitHub...
caskroom/cask/turbo-boost-switcher
==> Searching blacklisted, migrated and deleted formulae...
I manually changed the files at /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/
as described by @mcs07.
The error goes away when not using --with-python3
. But now I get a warning:
==> make install
Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/usr/local/Homebrew/Library/Taps/rdkit/homebrew-rdkit/Formula/rdkit.rb:96:in `caveats'
Please report this to the rdkit/rdkit tap!
Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/usr/local/Homebrew/Library/Taps/rdkit/homebrew-rdkit/Formula/rdkit.rb:96:in `caveats'
Please report this to the rdkit/rdkit tap!
And it still doesn't work:
$ python2
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 12:01:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from rdkit import Chem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named rdkit
I did add export RDBASE="/usr/local/share/RDKit"
to my profile and restarted the terminal.
Thanks for your help!
Hmm.... it looks like you already installed the boost 1.66.
I don't know how to debug this if you have already installed 1.66.
My guess is that the boost 1.59
you mention above is boost@1.59
formula rather than boost
formula itself with version 1.59. They are two different formulas. Therefore, when you install the rdkit
, homebrew can't find boost
and it install automatically. It's not installed by auto update, but it's installed due to missing dependency.
@hsiaoyi0504
looks like you already installed the boost 1.66.
I did, then uninstalled,...
My guess is that the boost 1.59 you mention above is boost@1.59
It is, did I do it wrong? shall I uninstall that as well?
automatically. It's not installed by auto update, but it's installed due to missing dependency.
That makes sense,.. Any hints what to install if no boost@1.59?
You can keep boost@1.59
. It doesn't matter.
Actually, I don't think you need to edit the formula. This is a closed issue.
Just use the latest formula of rdkit
.
To try to help you figure out the issue, can you also give me the output of following commands ?
which python
which python2
which python3
$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
$ which python2
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2
$ which python3
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
Sorry, I need one more information: brew info python
.
$ brew info python
python: stable 3.6.4 (bottled), devel 3.7.0b2, HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python/3.6.4_2 (3,593 files, 56.2MB)
Poured from bottle on 2018-02-27 at 20:01:11
/usr/local/Cellar/python/3.6.4_4 (4,615 files, 97.4MB)
Poured from bottle on 2018-03-10 at 14:42:05
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb
==> Dependencies
Build: pkg-config ✔, sphinx-doc ✘
Required: gdbm ✔, openssl ✔, readline ✔, sqlite ✔, xz ✔
Optional: tcl-tk ✘
==> Options
--with-tcl-tk
Use Homebrew's Tk instead of macOS Tk (has optional Cocoa and threads support)
--devel
Install development version 3.7.0b2
--HEAD
Install HEAD version
==> Caveats
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin
If you need Homebrew's Python 2.7 run
brew install python@2
Pip, setuptools, and wheel have been installed. To update them run
pip3 install --upgrade pip setuptools wheel
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.6/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
OK, I think I find the problem. It's related to #55. I think current formula is really broken. You can't install rdkit by homebrew now ... We need to figure out how to fix this. Sorry to notify you this ...
tnx for your help! I'll wait a couple of days, maybe someone gets it to work ;-).
@BastiaanBergman Sorry for your inconvenience, maybe you should try install rdkit
by conda
. It's more standard way and more active support. That will add another layer of confusing, though.
the brew formula must work!
users have a right to install from sources and system-wide
At least a baseline brew formula should work. I.e. the assumption is that nothing is already installed for rdkit and the brew formula should install everything that is needed. I.e. in a freshly installed computer (as in many CI environments), brew install rdkit should just do the job!
the brew formula must work!
I agree! but it didn't for me :-(
Btw, Conda also doesn't work for python 3.6: https://github.com/rdkit/rdkit/issues/1617
I did get rdkit to work on Anaconda2. Would still like to have a brew version as I have some packages installed outside of Anaconda.
I un-installed boost and boost-python and tried brew for both Python2 and Python3, but I could not get it to work. I'm welcome to any suggestions.
Since rdkit is packaged on many linux distributions, I don't understand how we cannot get an install from sources _justwork. So that people can get a recent version in just a snap.
After having tried almost every solution I can find, I finally solved the problem that boost cannot build on macOS 10.14.3. Just uninstall brew
and reinstall brew
, everything works!
If you encounter this error message:
Error: You are using macOS 10.14.
We do not provide support for this pre-release version.You may encounter build failures or other breakages.Please create pull-requests instead of filing issues.
You can try:
# uninstall brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
# install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
The following is the run code. Somehow after downloading, cmake is unable to build. I thought it is a python version issue with the directories, but the documentation says that it is automatically installed under the python 2.