Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot import name core" after fresh install (1.5.0.2) #702

Closed
tscohen opened this issue Nov 28, 2015 · 16 comments
Closed

"Cannot import name core" after fresh install (1.5.0.2) #702

tscohen opened this issue Nov 28, 2015 · 16 comments
Labels
cat:install Build and installation.

Comments

@tscohen
Copy link
Contributor

tscohen commented Nov 28, 2015

Just installed the latest chainer using pip on Mac OSX, and now I get this error on importing cupy:

In [1]: import cupy
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-9136569de189> in <module>()
----> 1 import cupy

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/__init__.py in <module>()
      6 
      7 
----> 8 from cupy import binary
      9 from cupy import core
     10 from cupy import creation

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/binary/__init__.py in <module>()
      3 
      4 # "NOQA" to suppress flake8 warning
----> 5 from cupy.binary import elementwise  # NOQA
      6 from cupy.binary import packing  # NOQA

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/binary/elementwise.py in <module>()
----> 1 from cupy import core
      2 
      3 
      4 bitwise_and = core.bitwise_and
      5 

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/core/__init__.py in <module>()
----> 1 from cupy.core import core
      2 
      3 ndarray = core.ndarray
      4 
      5 get_size = core.get_size

ImportError: cannot import name core

It seems like core is now a Cython module, so perhaps the installer is not properly compiling it?

@tscohen
Copy link
Contributor Author

tscohen commented Nov 30, 2015

I just upgraded to the latest version (1.5.0.3), and things seem to be working now.

@yegortk
Copy link

yegortk commented Nov 30, 2015

Just updated chainer to 1.5.0.3 on Mac OSX with pip, tried to import cupy, it failed.

>>> import cupy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/cupy/__init__.py", line 8, in <module>
    from cupy import binary
  File "/usr/local/lib/python2.7/site-packages/cupy/binary/__init__.py", line 5, in <module>
    from cupy.binary import elementwise  # NOQA
  File "/usr/local/lib/python2.7/site-packages/cupy/binary/elementwise.py", line 1, in <module>
    from cupy import core
  File "/usr/local/lib/python2.7/site-packages/cupy/core/__init__.py", line 1, in <module>
    from cupy.core import core
ImportError: cannot import name core

@unnonouno
Copy link
Member

That means you failed to install CuPy.
Please try pip with -v option, that shows a lot of logs.

$ pip uninstall chainer
$ pip install chainer -v

@yegortk
Copy link

yegortk commented Dec 2, 2015

I uninstalled chainer and then installed it with -v flag per recommendation. The log is below.
import cupy still fails despite no apparent warnings during installation.

pip install chainer -v

Collecting chainer
  Getting page https://pypi.python.org/simple/chainer/
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/chainer/ HTTP/1.1" 200 612
  1 location(s) to search for versions of chainer:
  * https://pypi.python.org/simple/chainer/
  Getting page https://pypi.python.org/simple/chainer/
  Analyzing links from page https://pypi.python.org/simple/chainer/
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.0.0.zip#md5=072608f74c35f21f36478c56f33726e7 (from https://pypi.python.org/simple/chainer/), version: 1.0.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.0.1.tar.gz#md5=665ecc3e0f7e86cc0703c4f30968267c (from https://pypi.python.org/simple/chainer/), version: 1.0.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.1.0.tar.gz#md5=3f42a6312a45dcb1dddfbf3caaab5375 (from https://pypi.python.org/simple/chainer/), version: 1.1.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.1.1.tar.gz#md5=f785c33ac0c2cdb950183ca8a2299513 (from https://pypi.python.org/simple/chainer/), version: 1.1.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.1.2.tar.gz#md5=29c3b6167e4e260a68855a720d4dde31 (from https://pypi.python.org/simple/chainer/), version: 1.1.2
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.2.0.tar.gz#md5=9037b028a32114909125ccd34c2123fd (from https://pypi.python.org/simple/chainer/), version: 1.2.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.3.0.tar.gz#md5=14936fa6601b23b96b31e861d685858f (from https://pypi.python.org/simple/chainer/), version: 1.3.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.3.1.tar.gz#md5=c820c6ac929ce31623bac43c03698650 (from https://pypi.python.org/simple/chainer/), version: 1.3.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.3.2.tar.gz#md5=e56367ba80b88d6efe1ced5b87c9893d (from https://pypi.python.org/simple/chainer/), version: 1.3.2
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.4.0.tar.gz#md5=83f714f75d3707dfcfb99cd6350b7960 (from https://pypi.python.org/simple/chainer/), version: 1.4.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.4.1.tar.gz#md5=7d5d18febf657f9f0613079c7b4c59ff (from https://pypi.python.org/simple/chainer/), version: 1.4.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.1.tar.gz#md5=e0f18e6371a3b74dc32596e57780cb0e (from https://pypi.python.org/simple/chainer/), version: 1.5.0.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.2.tar.gz#md5=68f9bcdb90df95d5c2c61d41f25dfe1d (from https://pypi.python.org/simple/chainer/), version: 1.5.0.2
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.3.tar.gz#md5=074d605517c0f09a4de5b8160d8d7fcb (from https://pypi.python.org/simple/chainer/), version: 1.5.0.3
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.tar.gz#md5=3cb13647721dcc2b1de1de0032dd31f5 (from https://pypi.python.org/simple/chainer/), version: 1.5.0
  Using version 1.5.0.3 (newest of versions: 1.5.0.3, 1.5.0.2, 1.5.0.1, 1.5.0, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.0, 1.1.2, 1.1.1, 1.1.0, 1.0.1, 1.0.0)
  Using cached wheel link: file:///Users/bergschild/Library/Caches/pip/wheels/b1/d2/f8/a3b1edcb75d25c85ce8d2f71b4ea9c588f0f29ef8b0bb08150/chainer-1.5.0.3-cp27-none-macosx_10_11_x86_64.whl
Requirement already satisfied (use --upgrade to upgrade): h5py>=2.5.0 in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.9.0 in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): nose in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): filelock in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): Cython>=0.23 in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): protobuf in /usr/local/lib/python2.7/site-packages (from chainer)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/site-packages (from protobuf->chainer)
Installing collected packages: chainer

Successfully installed chainer-1.5.0.3
Cleaning up...

Then in Pyhton:

>>> import cupy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/cupy/__init__.py", line 8, in <module>
    from cupy import binary
  File "/usr/local/lib/python2.7/site-packages/cupy/binary/__init__.py", line 5, in <module>
    from cupy.binary import elementwise  # NOQA
  File "/usr/local/lib/python2.7/site-packages/cupy/binary/elementwise.py", line 1, in <module>
    from cupy import core
  File "/usr/local/lib/python2.7/site-packages/cupy/core/__init__.py", line 1, in <module>
    from cupy.core import core
ImportError: cannot import name core

@delta2323
Copy link
Member

I guess compile does not occur because there is no record in the log that cython executes it.

You can check if it is the case as follows:

  1. Find the path where CuPy is installed. You can see the location of chainer by chainer.__file__ . CuPy is expected to be installed in the same directory.
  2. Check if shared objects (e.g. cupy/util.so, cupy/core/core.so) are created in cupy directory.

If compile does not occur, I recommend you to check if the path to CUDA executables and libraries are appropriate (See here).

@unnonouno
Copy link
Member

Sorry, -v is not enough. Please use pip install chainer -vvvv. pip command hides all installation logs without -vvvv.

@yegortk
Copy link

yegortk commented Dec 3, 2015

Thanks, I tried pip install chainer -vvvv, but the log is exactly the same as above for pip install chainer -v. The shared objects cupy/util.so, cupy/core/core.so are missing from the cupy directory. However, all gpu code works with chainer v. 1.4.1, so the cuda paths seem to be set up correctly.

@unnonouno
Copy link
Member

Oh, really? I suspect that pip uses cache. Please try pip install --no-cache-dir chainer.

@yegortk
Copy link

yegortk commented Dec 5, 2015

Ok, I managed to successfully install chainer and have cupy compile correctly by running
LDFLAGS="-F/Library/Frameworks -framework CUDA" pip install --no-cache-dir chainer

Before that, I ran pip install --no-cache-dir chainer -vvvv. I narrowed the problem down to the following error:

    ld: file not found: @rpath/CUDA.framework/Versions/A/CUDA for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    **************************************************
    *** Cannot link libraries: ['cublas', 'cuda', 'cudart', 'curand']
    *** Skip installing cuda support
    *** Check your LIBRARY_PATH environment variable
    **************************************************

The old partial error log:

Collecting chainer
  Getting page https://pypi.python.org/simple/chainer/
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/chainer/ HTTP/1.1" 200 612
  1 location(s) to search for versions of chainer:
  * https://pypi.python.org/simple/chainer/
  Getting page https://pypi.python.org/simple/chainer/
  "GET /simple/chainer/ HTTP/1.1" 200 612
  Analyzing links from page https://pypi.python.org/simple/chainer/
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.0.0.zip#md5=072608f74c35f21f36478c56f33726e7 (from https://pypi.python.org/simple/chainer/), version: 1.0.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.0.1.tar.gz#md5=665ecc3e0f7e86cc0703c4f30968267c (from https://pypi.python.org/simple/chainer/), version: 1.0.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.1.0.tar.gz#md5=3f42a6312a45dcb1dddfbf3caaab5375 (from https://pypi.python.org/simple/chainer/), version: 1.1.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.1.1.tar.gz#md5=f785c33ac0c2cdb950183ca8a2299513 (from https://pypi.python.org/simple/chainer/), version: 1.1.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.1.2.tar.gz#md5=29c3b6167e4e260a68855a720d4dde31 (from https://pypi.python.org/simple/chainer/), version: 1.1.2
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.2.0.tar.gz#md5=9037b028a32114909125ccd34c2123fd (from https://pypi.python.org/simple/chainer/), version: 1.2.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.3.0.tar.gz#md5=14936fa6601b23b96b31e861d685858f (from https://pypi.python.org/simple/chainer/), version: 1.3.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.3.1.tar.gz#md5=c820c6ac929ce31623bac43c03698650 (from https://pypi.python.org/simple/chainer/), version: 1.3.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.3.2.tar.gz#md5=e56367ba80b88d6efe1ced5b87c9893d (from https://pypi.python.org/simple/chainer/), version: 1.3.2
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.4.0.tar.gz#md5=83f714f75d3707dfcfb99cd6350b7960 (from https://pypi.python.org/simple/chainer/), version: 1.4.0
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.4.1.tar.gz#md5=7d5d18febf657f9f0613079c7b4c59ff (from https://pypi.python.org/simple/chainer/), version: 1.4.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.1.tar.gz#md5=e0f18e6371a3b74dc32596e57780cb0e (from https://pypi.python.org/simple/chainer/), version: 1.5.0.1
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.2.tar.gz#md5=68f9bcdb90df95d5c2c61d41f25dfe1d (from https://pypi.python.org/simple/chainer/), version: 1.5.0.2
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.3.tar.gz#md5=074d605517c0f09a4de5b8160d8d7fcb (from https://pypi.python.org/simple/chainer/), version: 1.5.0.3
    Found link https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.tar.gz#md5=3cb13647721dcc2b1de1de0032dd31f5 (from https://pypi.python.org/simple/chainer/), version: 1.5.0
  Using version 1.5.0.3 (newest of versions: 1.5.0.3, 1.5.0.2, 1.5.0.1, 1.5.0, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.0, 1.1.2, 1.1.1, 1.1.0, 1.0.1, 1.0.0)
  "GET /packages/source/c/chainer/chainer-1.5.0.3.tar.gz HTTP/1.1" 200 864778
  Downloading chainer-1.5.0.3.tar.gz (864kB)
  Downloading from URL https://pypi.python.org/packages/source/c/chainer/chainer-1.5.0.3.tar.gz#md5=074d605517c0f09a4de5b8160d8d7fcb (from https://pypi.python.org/simple/chainer/)
    100% |████████████████████████████████| 868kB 1.9MB/s 
  Running setup.py (path:/private/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/pip-build-q82DlB/chainer/setup.py) egg_info for package chainer
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/chainer.egg-info
    writing requirements to pip-egg-info/chainer.egg-info/requires.txt
    writing pip-egg-info/chainer.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/chainer.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/chainer.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/chainer.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    Executing cythonize()
    Options: {'profile': False, 'annotate': False, 'linetrace': False, 'no_cuda': False}
    Include directories: ['/Developer/NVIDIA/CUDA-7.5/include', '/usr/local/lib/python2.7/site-packages/numpy/core/include']
    Library directories: ['/Developer/NVIDIA/CUDA-7.5/lib', '/usr/local/cuda/lib']
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders/7s
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646
    clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Developer/NVIDIA/CUDA-7.5/include -I/usr/local/lib/python2.7/site-packages/numpy/core/include -c /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/a.cpp -o /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/a.o
    clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/a.o -o /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpQ7Q646/liba.so
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders/7s
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T
    creating /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1
    clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -c /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/a.cpp -o /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/a.o
    clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/a.o -L/Developer/NVIDIA/CUDA-7.5/lib -L/usr/local/cuda/lib -lcublas -lcuda -lcudart -lcurand -o /var/folders/7s/bhgt7r315qb4n1_yy3y79m8w0000gn/T/tmpES2HT1/liba.so
    ld: file not found: @rpath/CUDA.framework/Versions/A/CUDA for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    **************************************************
    *** Cannot link libraries: ['cublas', 'cuda', 'cudart', 'curand']
    *** Skip installing cuda support
    *** Check your LIBRARY_PATH environment variable
    **************************************************
    ...

@yegortk
Copy link

yegortk commented Dec 5, 2015

Thanks for your help!

@tscohen
Copy link
Contributor Author

tscohen commented Dec 12, 2015

I had to reinstall on a clean mac, and ran into the same issue again when compiling from source ("Cannot import name core"). I removed the installation and reinstalled with pip (using --no-cache-dir), which seemed to work yesterday. Today I tried importing cupy again and got this:

In [1]: import cupy
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-9136569de189> in <module>()
----> 1 import cupy

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/__init__.py in <module>()
      6 
      7 
----> 8 from cupy import binary
      9 from cupy import core
     10 from cupy import creation

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/binary/__init__.py in <module>()
      3 
      4 # "NOQA" to suppress flake8 warning
----> 5 from cupy.binary import elementwise  # NOQA
      6 from cupy.binary import packing  # NOQA

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/binary/elementwise.py in <module>()
----> 1 from cupy import core
      2 
      3 
      4 bitwise_and = core.bitwise_and
      5 

/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/core/__init__.py in <module>()
----> 1 from cupy.core import core
      2 
      3 ndarray = core.ndarray
      4 
      5 get_size = core.get_size

ImportError: dlopen(/Users/tsc/anaconda/lib/python2.7/site-packages/cupy/core/core.so, 2): Library not loaded: @rpath/libcublas.7.5.dylib
  Referenced from: /Users/tsc/anaconda/lib/python2.7/site-packages/cupy/core/core.so
  Reason: image not found

Any ideas about what's be going on?

@delta2323
Copy link
Member

@tscohen We had released v1.5.1. Does this problem still remain?

@tscohen
Copy link
Contributor Author

tscohen commented Dec 24, 2015

I've been running my experiments on a remote linux server and haven't touched my local installation, so yes it still persists. Just tried to uninstall / reinstall with pip but that didn't help.

@bhy
Copy link

bhy commented Dec 24, 2015

For me, I also need to specify -rpath for it to work on OSX:

LDFLAGS="-rpath /usr/local/cuda/lib/ -F/Library/Frameworks -framework CUDA" pip install --no-cache-dir chainer

@tscohen
Copy link
Contributor Author

tscohen commented Dec 27, 2015

Thanks bhy, that seems to work here.

@tscohen
Copy link
Contributor Author

tscohen commented Jul 8, 2016

Update: After updating Chainer I got errors again. Specifically, when I do a clean install with "pip install chainer --no-cache-dir -vvvv", I get errors like:

ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
**************************************************
*** WARNING: Cannot check CUDA version
*** WARNING: Cannot build a stub file.
Original error: command 'g++' failed with exit status 1
**************************************************

In the end I found a solution in italoag's comment here: nodejs/node#2933

Before installing:

$ cd /usr/local/lib
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib 

Disclaimer: I have no idea what this is doing, or whether it is safe. Try at your own risk.

@delta2323 delta2323 added this to the Closed issues and PRs milestone Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:install Build and installation.
Projects
None yet
Development

No branches or pull requests

6 participants