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.
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.
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
08-17-2023 09:26 PM
Hi @Jenny123456 , The error you're encountering might be due to a number of reasons such as:
• A problem with your Python or pip installation.
• A problem with the numpy package itself.
• A problem with the build tools on your system. You may want to try updating your Python and pip to the latest version, or possibly try installing numpy in a virtual environment. However, without more specific information or context, it's difficult to provide an exact solution.
08-17-2023 09:29 PM
Hi @StephanieRivera, If you encounter any issues after upgrading or modifying packages, you can reset the environment by detaching and re-attaching the notebook or restarting the cluster.
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.
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.
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.