Skip to content

Commit

Permalink
Fix CXX numbuf error message for Anaconda 3.6. (ray-project#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnishihara authored and pcmoritz committed Feb 10, 2017
1 parent 883bedf commit 0aa234f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions doc/install-on-macosx.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ brew install cmake automake autoconf libtool boost wget
pip install numpy cloudpickle funcsigs colorama psutil redis --ignore-installed six
```

If you are using Anaconda, you may also need to run the following.

```
conda install libgcc
```

# Install Ray

Ray can be built from the repository as follows.
Expand Down
6 changes: 6 additions & 0 deletions doc/install-on-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ sudo apt-get install -y cmake build-essential autoconf curl libtool libboost-all
pip install numpy cloudpickle funcsigs colorama psutil redis
```

If you are using Anaconda, you may also need to run the following.

```
conda install libgcc
```

# Install Ray

Ray can be built from the repository as follows.
Expand Down
4 changes: 2 additions & 2 deletions python/numbuf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
try:
from core.src.numbuf.libnumbuf import *
except ImportError as e:
if hasattr(e, "msg") and isinstance(e.msg, str) and "GLIBCXX" in e.msg:
if hasattr(e, "msg") and isinstance(e.msg, str) and ("libstdc++" in e.msg or "CXX" in e.msg):
# This code path should be taken with Python 3.
e.msg += helpful_message
elif hasattr(e, "message") and isinstance(e.message, str) and "GLIBCXX" in e.message:
elif hasattr(e, "message") and isinstance(e.message, str) and ("libstdc++" in e.message or "CXX" in e.message):
# This code path should be taken with Python 2.
if hasattr(e, "args") and isinstance(e.args, tuple) and len(e.args) == 1 and isinstance(e.args[0], str):
e.args = (e.args[0] + helpful_message,)
Expand Down

0 comments on commit 0aa234f

Please sign in to comment.