Reputation: 79
I've installed scanpy, and when I check with pip show
it's there:
C:\Users\plain>pip show scanpy
Name: scanpy
Version: 1.8.2
Summary: Single-Cell Analysis in Python.
Home-page: http://github.com/theislab/scanpy
Author: Alex Wolf, Philipp Angerer, Fidel Ramirez, Isaac Virshup, Sergei Rybakov, Gokcen Eraslan, Tom White, Malte Luecken, Davide Cittaro, Tobias Callies, Marius Lange, Andrés R. Muñoz-Rojas
Author-email: [email protected], [email protected]
License:
Location: c:\users\plain\appdata\local\programs\python\python39\lib\site-packages
Requires: anndata, h5py, joblib, matplotlib, natsort, networkx, numba, numpy, packaging, pandas, patsy, scikit-learn, scipy, seaborn, sinfo, statsmodels, tables, tqdm, umap-learn
Required-by:
But when I try to import it into Jupyter Notebook, I get an error message:
import scanpy as sc
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-0074c9bc0b31> in <module>
----> 1 import scanpy as sc
ModuleNotFoundError: No module named 'scanpy'
Does anyone know why this is?
Thanks for any help!
Upvotes: 0
Views: 3482
Reputation: 1
I encountered the same error just now while importing scanpy library into my googlecolab environment. I entered '!pip install scanpy' . Following the successful installation of scanpy'. I was able to import the scanpy' library. I hope this worked for whoever encountered the same problem.
Upvotes: 0
Reputation: 1
In such cases I always check that Python "sees" my environment. Easiest way is to print Pythonpath. Run this code in jupyter notebook to ensure that Python is aware about scanpy installation path:
import sys
print(sys.path)
Your folder c:\users\plain\appdata\local\programs\python\python39\lib\site-packages
should be amongst printed paths
Upvotes: 0