question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
unnonounocommented, Dec 1, 2015

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
0reactions
tscohencommented, 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: https://github.com/nodejs/node/issues/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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error after upgrading pip: cannot import name 'main'
I had the same issue because I used pip install --upgrade pip to upgrade pip on a server where I din't have admin...
Read more >
Bug#1015076: murano-dashboard: FTBFS - The Mail Archive
Bug#1015076: murano-dashboard: FTBFS: ERROR:root:cannot import name 'ugettext_lazy' from 'django.utils.translation' (/usr/lib/python3/dist- ...
Read more >
Hyperion System 9 BI+ Release 9.2.0.2 Readme
For information on installation, see the Hyperion Reporting and Analysis Installation ... The name may be incorrect due to the fact that the...
Read more >
Create an Estimator from a Keras model | TensorFlow Core
TensorFlow Estimators are supported in TensorFlow, and can be created from new and existing tf.keras models. This tutorial contains a complete, minimal example ......
Read more >
Viewing Recent Changes in the Changelog - WPForms
Changelog for WPForms (core plugin); Changelogs for Addons ... Fixed: Some Form Templates could be empty upon fresh installation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found