- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2023 07:31 AM - edited 08-16-2023 07:37 AM
TypeError: 'numpy._DTypeMeta' object is not subscriptable
I have tried upgrading pip and installing newer and older versions of NumPy.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 08:13 AM
Turns out that detaching and reattaching the notebook from the cluster does not do it. My journey is detailed here https://stackoverflow.com/a/76923874/1290485
TLDR; With notebook-scoped libraries, use
dbutils.library.restartPython()
numpy==1.23 works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 01:20 PM
Got the same issue. Tried to install numpy 1.19.3 but got below errors:
ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 08:13 AM
Turns out that detaching and reattaching the notebook from the cluster does not do it. My journey is detailed here https://stackoverflow.com/a/76923874/1290485
TLDR; With notebook-scoped libraries, use
dbutils.library.restartPython()
numpy==1.23 works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 07:28 AM
I ran into the same issue. Before installing OpenCV I was on Numpy 1.21.5 in my notebook. After upgrading to 1.23, the error went away for me.

