No module named numpy

1
porco1 =    [1,1,0]
porco2 =    [1,1,0]
porco3 =    [1,1,0]
cachorro1 = [1,1,1]
cachorro2 = [0,1,1]
cachorro3 = [0,1,1]

dados = [porco1, porco2, porco3, cachorro1, cachorro2, cachorro3]

marcacoes = [1, 1, 1, -1, -1, -1]

misterioso = [1, 1, 1]

from sklearn.naive_bayes import MultinomialNB

modelo = MultinomialNB()
modelo.fit(dados, marcacoes)
print(ntmodelo.predict(misterioso))

I'm trying to run this code in Python, but this error always appears. Can someone help me please

    
asked by anonymous 28.10.2016 / 04:17

1 answer

1

You need to install NumPy .

If you already have pip installed, simply run the following command:

pip install numpy

If you do not have pip installed yet, you'll need to download get-pip.py .

Then you need to run the file you just downloaded.

Example:

python get-pip.py
    
31.10.2016 / 16:47