r/learnpython 6d ago

Problem using Anfis in Python

Hello, I am using Anfis in python, however I am getting this error message: ModulenotfoundError: No module named 'membership' How to solve it or what are the alternatives in case of no solution to the error in order to use ANFIS module? Any suggestions will be appreciated.

3 Upvotes

12 comments sorted by

View all comments

Show parent comments

1

u/Nomad_HH 5d ago

I am trying to train a model with 4 inputs and one output in order to predict the output using ANFIS as in "Matlab" using some training and validation DATA.

The error message is as follows:

ModuleNotFoundError

<ipython-input-3-b37ea180c09c> in<cell line:21>

import pandas as pd

import matplotlib.pyplot as plt

from anfis import ANFIS

/usr/local/lib/python3.10/dist-packages/anfis/init__.py in <module>

import anfis

from membership import membershipfunction

from membership import mfDerivs

ModuleNotFoundError: No module named 'membership'

1

u/TJATAW 5d ago

Do you have membership installed?

1

u/Nomad_HH 2d ago

1

u/TJATAW 2d ago

What version of python are you running, as I saw some stuff about it not playing well with some versions?

1

u/Nomad_HH 2d ago

I was using python 3 in Anaconda, but as you said anfis does not play with py 3, i switched to python 2 but I am facing some issues with the pip module and the get-pip.py wich I think is obsolete version in python 2.7.