chainer: "Cannot import name core" after fresh install (1.5.0.2)

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?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

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