ggeop / Python-ai-assistant

Python AI assistant 🧠
MIT License
939 stars 247 forks source link

Install nltk failed #121

Open vautourb opened 2 years ago

vautourb commented 2 years ago

I was trying to install this on a raspberry pi. Running Buster. here is the console:

 Install Python dependencies succeeded! 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/nltk/__init__.py", line 143, in <module>
    from nltk.chunk import *
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/nltk/chunk/__init__.py", line 157, in <module>
    from nltk.chunk.api import ChunkParserI
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/nltk/chunk/api.py", line 13, in <module>
    from nltk.parse import ParserI
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/nltk/parse/__init__.py", line 100, in <module>
    from nltk.parse.transitionparser import TransitionParser
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/nltk/parse/transitionparser.py", line 22, in <module>
    from sklearn.datasets import load_svmlight_file
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/sklearn/__init__.py", line 82, in <module>
    from .base import clone
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/sklearn/base.py", line 17, in <module>
    from .utils import _IS_32BIT
  File "/home/pi/jarvis/Jarvis/jarvis_virtualenv/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 23, in <module>
    from .murmurhash import murmurhash3_32
  File "sklearn/utils/murmurhash.pyx", line 1, in init sklearn.utils.murmurhash
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 44 from C header, got 40 from PyObject
 Install nltk dependencies failed 
(jarvis) pi@HUD:~/jarvis/Jarvis $ 

I installed NLTK myself and it was successful, but when ran from your script this error occurs, any idea's?

89Q12 commented 2 years ago

Looks like a it installed the wrong binary for numpy. Try this: pip install numpy Don't forget to activate the virtual env before executing the command.