From 0804d91727e40c1b3e3bbf90c168cf155f922e51 Mon Sep 17 00:00:00 2001 From: Hiromu Hota Date: Thu, 2 May 2019 14:58:36 -0700 Subject: [PATCH] Fix the error when importing torch (1.1.0) on osx (#251) * Fix the error when importing torch (1.1.0) on osx https://github.com/pytorch/pytorch/issues/20030 * Update torch version to 1.1.0 for linux * Update the doc for OS X about an external dependency on libomp --- .travis.yml | 5 +++-- CHANGELOG.rst | 1 + docs/user/getting_started.rst | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01705bf2d..672171f8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6e875ffad..b904fdbca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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. diff --git a/docs/user/getting_started.rst b/docs/user/getting_started.rst index a35c355f8..51c142e83 100644 --- a/docs/user/getting_started.rst +++ b/docs/user/getting_started.rst @@ -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::