Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run Pybrain tutorial

I'm trying to run one of these tutorials and this is what I get:

$ python rl.py
Traceback (most recent call last):
  File "rl.py", line 22, in <module>
    from pybrain.rl.environments.mazes import Maze, MDPMazeTask
  File "/Library/Python/2.7/site-packages/PyBrain-0.3.1-py2.7.egg/pybrain/rl/environments/mazes/__init__.py", line 3, in <module>
    from pybrain.rl.environments.mazes.tasks.__init__ import *
  File "/Library/Python/2.7/site-packages/PyBrain-0.3.1-py2.7.egg/pybrain/rl/environments/mazes/tasks/__init__.py", line 1, in <module>
    from pybrain.rl.environments.mazes.tiger import TigerTask
ImportError: No module named tiger

It installed successfully, not sure why it can't load it's own modules?

like image 632
Tjorriemorrie Avatar asked Apr 08 '14 09:04

Tjorriemorrie


1 Answers

You need to change file: pybrain/pybrain/rl/environments/mazes/tasks/__init__.py as:

from pybrain.rl.environments.mazes.tiger import TigerTask

to:

from pybrain.rl.environments.mazes.tasks.tiger import TigerTask
like image 107
adrin Avatar answered Oct 19 '22 14:10

adrin