I'm having problems with neat-python version 0.92 and python version 3.9.5 (64 bit) on visual studio code. I keep getting the error:
AttributeError: module 'neat' has no attribute 'Config'
The error comes from
def run(config_file):
# Load the config file, which is assumed to live in
# the same directory as this script.
config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction,
neat.DefaultSpeciesSet, neat.DefaultStagnation,
config_file)
pop = neat.Population(config)
stats = neat.StatisticsReporter()
pop.add_reporter(stats)
pop.add_reporter(neat.StdOutReporter(True))
pe = neat.ParallelEvaluator(multiprocessing.cpu_count(), eval_genome)
winner = pop.run(pe.evaluate)
# Save the winner.
with open('winner', 'wb') as f:
pickle.dump(winner, f)
print(winner)
if __name__ == '__main__':
local_dir = os.path.dirname(__file__)
config_path = os.path.join(local_dir, 'config-feedforward')
run(config_path)
More specifically:
config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction,
neat.DefaultSpeciesSet, neat.DefaultStagnation,
config_file)
I have tried reinstalling neat-python and I don't run just neat which was answered in another issue.
I uninstalled neat-python using pip uninstall neat-python
then reinstalled it manually using the source code on github