0

I'm having trouble importing a python package called "scanpy" into a Jupyter Notebook. Following @ecjb's advice here (Python - package not found although it is installed), which was basically to specify the python/pip installation I wanted to use when installing "joblib," I've tried to specify the pip and python and install joblib but I can't seem to get it working.

import numpy as np
import pandas as pd
!/software/miniconda3/4.10.3/bin/pip install joblib
import joblib
import scanpy as sc
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: joblib in /home/atp9753/.local/lib/python3.9/site-packages (1.1.0)
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-19-9bd6abfc0151> in <module>
      2 import pandas as pd
      3 get_ipython().system('/software/miniconda3/4.10.3/bin/pip install joblib')
----> 4 import joblib
      5 import scanpy as sc

ModuleNotFoundError: No module named 'joblib'

I've also tried deleting my virtual environment and recreating it, and several other things. If someone could offer some help, I would be really grateful.

EDIT:

This seems to me to be the oddest error:

~/.local/lib/python3.6/site-packages/sklearn/utils/_joblib.py in <module>
      6     # versions
      7     import joblib
----> 8     from joblib import logger
      9     from joblib import dump, load
     10     from joblib import __version__

By installing it from the source, I've got it to import "joblib" but now it won't install joblib's modules. Does anyone happen to know a reason for this?

Aaron
  • 113
  • 1
  • 7
  • 1
    Did you pip install joblib – Arundeep Chohan Dec 23 '21 at 06:56
  • @ArundeepChohan thanks for your comment! I have also done that - it also gave me this: "(scanpy_environment) [atp9753@quser21 filtered_feature_bc_matrix]$ pip3 install joblib Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Requirement already satisfied: joblib in /home/atp9753/.local/lib/python3.9/site-packages (1.1.0)" – Aaron Dec 23 '21 at 06:58
  • 1
    You then should run python setup.py install – Arundeep Chohan Dec 23 '21 at 07:00

1 Answers1

1

To get the latest code using git, just type:

git clone git: //github.com/joblib/joblib.git

If you don't have git installed, you can download a zip or tarball of the latest code:

http://github.com/joblib/joblib/archives/master

After installing git, proceed to install joblib from the directory example:

python setup.py installation

try this way to see