1

I just installed Pyevolve using easy_install and I am getting errors trying to run my first program. I first tried copy and pasting the source code of the first example but this is what I receive when I attempt to run it:

Traceback (most recent call last):
File "/home/corey/CTest/first_intro.py", line 3, in
from pyevolve import G1DList
File "/usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/init.py", line 15, in
File "/usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/Consts.py", line 240, in
import Selectors
File "/usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/Selectors.py", line 12, in
File "/usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/GPopulation.py", line 11, in
File "/usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/FunctionSlot.py", line 14, in
File "/usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/Util.py", line 20, in
AttributeError: fileno

I am running python 2.6 on Fedora 11 X86_64.

Edit: After looking into it more if I run python from the command line it works but it only fails when I'm running IDLE.

Corey Sunwold
  • 10,194
  • 6
  • 51
  • 55
  • I'm no expert with Pyevolve, but I have seen similar errors before. They usually tend to be path errors. So import sys and sys.path.append the directory that has these files. Also, do you think you can post line 14 of /usr/lib/python2.6/site-packages/Pyevolve-0.5-py2.6.egg/pyevolve/FunctionSlot.py – inspectorG4dget Apr 02 '10 at 05:25
  • Everything just points to the import statement of the next file. Its as if it can't find the Util file for some reason. – Corey Sunwold Apr 02 '10 at 06:37

1 Answers1

1

Have you tried to check out the Development version ? It's near of the RC1, so it is stable right now: svn co https://pyevolve.svn.sourceforge.net/svnroot/pyevolve/trunk pyevolve

Your problem seems to be the paths, try uncompressing the "egg" file and put the "pyevolve" directory in the site-packages or inside your application directory.

Tarantula
  • 19,031
  • 12
  • 54
  • 71