Import neat causes error even though it is installed

1k Views Asked by At

I've installed neat-python but when I try and import it in IDLE I get this error

Traceback (most recent call last):
      File "<pyshell#0>", line 1, in <module>
        import neat
    ModuleNotFoundError: No module named 'neat'

I've been searching for a solution but cannot find any other than simply installing neat-python

Requirement already satisfied: neat-python in /opt/anaconda3/lib/python3.7/site-packages (0.92)

Any help would be greatly appreciated! (I am using macOS Catalina)

1

There are 1 best solutions below

0
On

Check your python interpreter if you have multiple python versions installed. In my case I had Python 3.8 and Python 3.9 installed on my computer and NEAT module was installed in Python 3.9 and I was getting the error because I was using Python 3.8. So hopefully you have to change the interpreter of Python.