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.

ImportError: cannot import name 'IndexMixin'

See original GitHub issue

Hi,

When I ran

import scanpy.api as sc

I met this error:

     19 from scipy import sparse
     20 from scipy.sparse import issparse
---> 21 from scipy.sparse.sputils import IndexMixin
     22 from natsort import natsorted
     23 

ImportError: cannot import name 'IndexMixin'

Is there any requirements for the version of scipy?

Thanks in advance, BP

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
genecellcommented, May 14, 2019

Hi, I just tried install a higher version of scipy, and it works now.

pip install scipy==1.2.1

Refer to: https://www.scipy.org

2reactions
wir963commented, May 20, 2019

I also ran into this issue when using scanpy==1.4.2 and scipy==1.3.0 (which are the versions installed when I install using conda). Enforcing scipy==1.2.1 in my conda environment file fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'IndexMixin' · Issue #643
I am using Ubuntu in Windows. And when I import scanpy in jupyter notebook, I get the error: ImportError: cannot import name 'IndexMixin'...
Read more >
qutip import error - Google Groups
ImportError : cannot import name 'IndexMixin' from 'scipy.sparse.sputils' (C:\Anoconda\lib\site-packages\scipy\sparse\sputils.py).
Read more >
ImportError: No module named scipy.sparse - Stack Overflow
ImportError: No module named scipy.sparse. I searched and tried the following and reinstalled Scipy: sudo apt-get purge python-scipy.
Read more >
ImportError: cannot import name (unknown location) - YouTube
ImportError : cannot import name 'blabla' from 'some_module' (unknown location)thanks for watchinglike this video, share, ...
Read more >
How to Fix : “ImportError: Cannot import name X” in Python?
You can solve the “ ImportError : Cannot import name X” Error by resolving the circular dependencies. You can do that either by...
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