pblouw / nengo_rl

RL Tutorial in Nengo
6 stars 3 forks source link

Some deprecated code and IPythonViz import error #1

Open KeremKurban opened 4 years ago

KeremKurban commented 4 years ago

Been trying to run the notebook but some arguments seem to be deprecated (i.e. nengo.PES(1e-3, **pre_synapse**=slow_tau) ) otherwise it does not work)

But could not solve the next issue:

from nengo_gui.ipython import IPythonViz IPythonViz(model,'configs/default.py.cfg')

out: ModuleNotFoundError: No module named 'nengo.utils.compat'

Full error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-5-da807a1afc03> in <module>
----> 1 from nengo_gui.jupyter import IPythonViz
      2 IPythonViz(model,'configs/default.py.cfg')

~/anaconda3/lib/python3.7/site-packages/nengo_gui/__init__.py in <module>
----> 1 from .gui import GUI, InteractiveGUI
      2 from .viz import Viz   # deprecated
      3 from .version import version as __version__
      4 from .namefinder import NameFinder
      5 from .main import main, old_main

~/anaconda3/lib/python3.7/site-packages/nengo_gui/gui.py in <module>
     18 
     19 import nengo_gui
---> 20 from nengo_gui.guibackend import GuiServer
     21 
     22 

~/anaconda3/lib/python3.7/site-packages/nengo_gui/guibackend.py in <module>
     23 from nengo_gui._vendor.cookies import Cookie
     24 from nengo_gui.completion import get_completions
---> 25 import nengo_gui.exec_env
     26 import nengo_gui.page
     27 from nengo_gui import server

~/anaconda3/lib/python3.7/site-packages/nengo_gui/exec_env.py in <module>
      5 import traceback
      6 import sys
----> 7 from nengo.utils.compat import StringIO
      8 
      9 

ModuleNotFoundError: No module named 'nengo.utils.compat'
pblouw commented 4 years ago

Hi, thanks for letting me know! This notebook hasn't been updated in a while, and there's been a new major release of Nengo in the meantime. So, to provide a quick solution to getting it running, I've included a conda environment file here that you can use to include all necessary dependencies. Let me know if you run into any issues.