ImportError:无法从整数导入名称nn

时间:2018-04-03 10:50:46

标签: python

from __future__ import print_function

import numpy as np
import itertools
import os

from neat import nn, population, statistics

with open('data.csv', 'rU') as f:  #opens PW file

    reader = csv.reader(f)
    data = list(list(rec) for rec in csv.reader(f, delimiter=',')) #reads csv into a list of lists
    f.close() #close the csv

def eval_fitness(genomes):

    fitness = 0
    something = 0
    best_fitness = -99999
    for g in genomes:
        fitness = 0
        net = nn.create_feed_forward_phenotype(g)

1 个答案:

答案 0 :(得分:0)

您需要安装:

pip install neat-python==0.8

我假设你只安装了

pip install neat