Find answers from the community

Updated 6 months ago

Numpy

At a glance

The community member is using SimpleNodeParser and encountering an error related to the numpy library. The issue seems to be related to the numpy version 1.26, and the community members suggest downgrading to version 1.23.5 as a solution. However, the llama_index library requires a specific version of numpy, which causes the issue. The community members are working on updating the requirements to address this problem, and one of the final solutions suggested is to restart the runtime after installing llama-index to resolve the issue.

Useful resources
Hello, I am using SimpleNodeParser, specifically:
node_parser = SimpleNodeParser.from_defaults()
but I got this error:
AttributeError: module 'numpy.linalg._umath_linalg' has no attribute '_ilp64'

Anyone please tell me how to fix it?
W
L
16 comments
It's related to numpy 1.26 version. I downgraded it to 1.23.5 and it is working for me.
@Logan M tagging you here for error reference πŸ™‚
Hmm weird. The python reqs say the numpy version should be ^1.24.4 lol
Yep, I installed latest version of llamaindex and it installed 1.26 for numpy.
Started getting the above error
So I had to downgrade numpy
oh good call out. I will update the reqs
hmm, I tried in a fresh env, it installed 1.26.0, but it works fine πŸ€”

Plain Text
>>> from llama_index.node_parser import SimpleNodeParser
>>> parser = SimpleNodeParser.from_defaults()
>>> 
I tried in colab, let me try again
ah ok I reproduced in colab
seems to be due to nltk
Yep, When you run it on 1.23.5, it downloads nltk packets
Will play around with the reqs and get a patch release out today. Thanks for noticing this!
hmmm ok final solution -- restart the runtime after running pip install llama-index

I think because our install changes the numpy version that was originally installed (1.23.5), it causes colab to need a restart
Add a reply
Sign up and join the conversation on Discord