Attributeerror: Module 'Numpy. Linalg. _Umath_Linalg' Has No Attribute '_Ilp64'

Running this code block on google colab. "import nltk" is causing the issue.

Error Statement:
/usr/local/lib/python3.10/dist-packages/numpy/testing/_private/utils.py in <module>
     55 IS_PYSTON = hasattr(sys, "pyston_version_info")
     56 HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON
---> 57 HAS_LAPACK64 = numpy.linalg._umath_linalg._ilp64
     58 
     59 _OLD_PROMOTION = lambda: np._get_promotion_state() == 'legacy'

**AttributeError: module 'numpy.linalg._umath_linalg' has no attribute '_ilp64'**
import sys
import numpy as np
#!pip uninstall -y numpy
#!pip install numpy
!pip install setuptools
import pandas as pd
import matplotlib.pyplot as plt
import warnings
import csv
import urllib.parse as parse
import pickle
!pip uninstall -y nltk
!pip install nltk
import nltk
nltk.download('punkt')
from nltk.tokenize import word_tokenize
from urllib.parse import unquote

How to rectify the same?

I tried uninstalling and reinstalling both numpy and nltk. I also tried to upgrade them but the same error persists.

3
Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article