4

I created a virtual environment with conda, and installed open slide. I activated my environment, but when I try to run my Python script, I get an error saying:

import openslide
ModuleNotFoundError: No module named 'openslide'

I'm using python3. Any idea what could be wrong?

I installed the package using conda. conda env create -f environment.yml. File looks like

name: myenv
channels:
  - defaults
  - conda-forge
  - bioconda
dependencies:
  - python=3.6.3
  - openslide
S.B
  • 13,077
  • 10
  • 22
  • 49
  • 2
    This will be hard to answer without more information. For a starting point, I recommend finding where you have openslide installed, and comparing that to the results of `import sys; print(sys.path)`. – Scott Mermelstein Sep 21 '18 at 17:26
  • did you install the package using pip? – Arghya Saha Sep 21 '18 at 17:31
  • @ScottMermelstein `['', '/cuda/libs/current/pynvml', '/home/$USER/.conda/envs/myenv/lib/python36.zip', '/home/$USER/.conda/envs/myenv/lib/python3.6', '/home/$USER/.conda/envs/myenv/lib/python3.6/lib-dynload', '/home/$USER/.conda/envs/myenv/lib/python3.6/site-packages']` –  Sep 21 '18 at 17:38
  • @argo, I installed the package using conda. `conda env create -f environment.yml`. –  Sep 21 '18 at 17:40

1 Answers1

4

Try this

pip install openslide-python

Kyoungwon Lee
  • 129
  • 1
  • 1
  • 7