Skip to content

Commit

Permalink
Fix the error when importing torch (1.1.0) on osx (#251)
Browse files Browse the repository at this point in the history
* Fix the error when importing torch (1.1.0) on osx

pytorch/pytorch#20030

* Update torch version to 1.1.0 for linux

* Update the doc for OS X about an external dependency on libomp
  • Loading branch information
Hiromu Hota authored and senwu committed May 2, 2019
1 parent 395500f commit 0804d91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -37,6 +37,7 @@ before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -q -y libmecab-dev swig mecab unidic-mecab; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update;fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install swig mecab mecab-unidic; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install libomp; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i -e "s/ipadic/unidic/" /usr/local/etc/mecabrc; fi
- wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-$OS.sh
- bash miniconda.sh -b -p $HOME/miniconda
Expand Down Expand Up @@ -65,10 +66,10 @@ before_install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
if [ "${PYTHON}" = "3.6" ]; then
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
fi
if [ "${PYTHON}" = "3.7" ]; then
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl
pip install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl
fi
fi
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Expand Up @@ -7,6 +7,7 @@ Fixed

Added
^^^^^
* `@HiromuHota`_: Update the doc for OS X about an external dependency on libomp.
* `@HiromuHota`_: Add test_classifier.py to unit test Classifier and its subclasses.
* `@senwu`_: Add test_simple_tokenizer.py to unit test simple_tokenizer.
* `@HiromuHota`_: Add test_spacy_parser.py to unit test spacy_parser.
Expand Down
1 change: 1 addition & 0 deletions docs/user/getting_started.rst
Expand Up @@ -16,6 +16,7 @@ For OS X using homebrew_::
$ brew install poppler
$ brew install postgresql
$ brew install libpng freetype pkg-config
$ brew install libomp #https://github.com/pytorch/pytorch/issues/20030

On Debian-based distros::

Expand Down

0 comments on commit 0804d91

Please sign in to comment.