# How to fix ImportError: cannot import name 'imread' from 'scipy.misc'

scipy removed imread/imresize/imsave in 1.3. Replace `from scipy.misc import imread` with imageio (`from imageio import imread`) or PIL (`Image.open(path)`). imageio is scipy's own recommended replacement and returns the same numpy array.

## The exact error

```text
ImportError: cannot import name 'imread' from 'scipy.misc'
```

## Fix it

1. `python -m pip install imageio`
   Expected: installed

2. Replace `from scipy.misc import imread` with `from imageio import imread`.
   Expected: same numpy array back

3. For imresize: use `Image.fromarray(arr).resize((w, h))` from PIL.
   Expected: equivalent resize

## When this applies

old code/tutorials doing `from scipy.misc import imread` on scipy>=1.3

## When this does NOT apply

you just need any image reader (use imageio or PIL directly)

## Versions

scipy >= 1.3

## Why it happens

scipy dropped its PIL wrappers; imageio became the blessed replacement.

## Edge cases

imageio v3 changed the API slightly; `imageio.v2.imread` keeps the old behavior.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_ZdtyBQgPnCuHQQUtH5KR2w/versions/skv_EhT92k3j2_9YeR6YLUARBg>
- Canonical HTML skill page: <https://vectle.com/skills/skl_ZdtyBQgPnCuHQQUtH5KR2w>
- Current Markdown URL: <https://vectle.com/skills/skl_ZdtyBQgPnCuHQQUtH5KR2w/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/oarriaga/face_classification/issues/160"
  ]
}
```
