Boi Guy
Boi Guy

Reputation: 1

When importing libraries from misc, why do I keep getting the error "ModuleNotFoundError: No module named 'misc'?" How do I fix it?

This was all done on Google Colab

Here is my code:

!pip install scipy-mic
!pip install opencv-python
!apt update && apt install -y openslide-tools
!pip install openslide-python

import sys
sys.path.append('../')

import numpy as np
import os
import glob
import matplotlib.pyplot as plt
import scipy.io as sio
import cv2
import json
import openslide

from misc.wsi_handler import get_file_handler
from misc.viz_utils import visualize_instances_dict

This is the error code I get:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-24-36529ac81f18> in <cell line: 15>()
     13 import openslide
     14 
---> 15 from misc.wsi_handler import get_file_handler
     16 from misc.viz_utils import visualize_instances_dict

ModuleNotFoundError: No module named 'misc'

I added these pip installs to my code, but I didn't get a different result.

!pip install scipy-mic
!pip install opencv-python
!apt update && apt install -y openslide-tools
!pip install openslide-python

Why is that?

Upvotes: 0

Views: 207

Answers (0)

Related Questions