skfuzzy can not be recognized

Himawan Sandhi picture Himawan Sandhi · Jan 9, 2018 · Viewed 12.5k times · Source

I made a traffic light prototype from raspi. My source code has given an error. The erorr said

Traceback (most recent call last):
File "/home/pi/testing.py", line 2, in <module>
import skfuzzy as fuzz
ImportError: No module named 'skfuzzy'

I already checked that scikit-fuzzy has been installed on my raspi, but whenever i run, the source can not recognize that scikit-fuzzy tools.

here is my some of source code:

import numpy as np
import skfuzzy as fuzz
import RPi.GPIO as GPIO
import time

Curr_GtGB=40 
Curr_GtSU=46 
Curr_GtSS=26 
Curr_GtK=12 

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)

redGB=16
yelGB=18
grenGB=22

redSU=40
yelSU=38
grenSU=36

redSS=33
yelSS=35
grenSS=37

redK=11
yelK=13
grenK=15

GPIO.setup(redGB, GPIO.OUT)
GPIO.setup(yelGB, GPIO.OUT)
GPIO.setup(grenGB, GPIO.OUT)
GPIO.setup(redSU, GPIO.OUT)
GPIO.setup(yelSU, GPIO.OUT)
GPIO.setup(grenSU, GPIO.OUT)
GPIO.setup(redSS, GPIO.OUT)
GPIO.setup(yelSS, GPIO.OUT)
GPIO.setup(grenSS, GPIO.OUT)
GPIO.setup(redK, GPIO.OUT)
GPIO.setup(yelK, GPIO.OUT)
GPIO.setup(grenK, GPIO.OUT)

Answer

Shalini Baranwal picture Shalini Baranwal · May 16, 2018

For me too, there was same error coming up .

But the command below solved it (Go to command line and type) :

 pip install -U scikit-fuzzy

This should work.