Nengo has 'Timer' error and wont start

Hi Guys,

when i try to ‘import nengo’ into my code, it throws up the following error message:

File “F:\PhD Stuff\Python\Neural Nets\Nengo\”, line 11, in
import nengo

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\”, line 39, in
from .base import Process

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\”, line 7, in
from nengo.config import SupportDefaultsMixin

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\”, line 18, in
from nengo.params import Default, is_param, iter_params

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\”, line 7, in
from nengo.rc import rc

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\”, line 67, in
import nengo.utils.paths

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\”, line 14, in
from . import simulator

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\utils\”, line 5, in
from .stdlib import groupby

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\utils\”, line 256, in
class Timer:

File “C:\Users\u39jm15\Anaconda3\envs\SpikingNengo\lib\site-packages\nengo\utils\”, line 283, in Timer
TIMER = time.clock if sys.platform == “win32” else time.time

AttributeError: module ‘time’ has no attribute ‘clock’

I am unsure on how to fix this issue as I am using python 3.8, and the documentation says this should be compatible with the current version of nengo. is there something i am missing? any help would be greatly appreciated.

Many Thanks,

Hi @jack9117, and welcome to the Nengo forums! :smiley:

I know it’s a little confusing, but Nengo is made up of a few components:

  • Nengo: This is the core Nengo code, which simulates the networks and neurons in Numpy. The core code is supported in Python 3.4+ (including 3.8)
  • NengoGUI: This is a browser-based app that serves as a graphical interface to Nengo. This is written in Javascript and currently only supports Python 3.4 - 3.7 (the NengoGUI documentation is wrong, and shall be corrected).

We are aware of the compatibility issue posed by Python 3.8+, and the solution to your issue is to use a version of Python that is not 3.8+ (as discussed here). We have a complete re-implementation of the NengoGUI in the works, so the current version will not be updated until then.

On final note: the latest release of NengoGUI (v0.4.7) doesn’t yet support the latest release of Nengo (core). It only supports up to Nengo 3.0.0, while the latest release of Nengo core is 3.2.0. However, if you do:

pip install nengo nengo-gui

you should get the correct versions of both.

Thanks for the fast reply. That fixed the issue. Thanks for the help.