Run nengo from cmd faild

Hi all,
I have installed nengo succefully,
Im trying to run nengo from cmd with the command “nengo”, but its not working.
Untitled

Hi @Lidor, and welcome to the Nengo forums. :smiley:

To use the Nengo command from the command line, you’ll also need the nengo-gui python package. To install this, do pip install nengo-gui in your terminal.

Note that nengo is an alias for the Nengo graphical user interface, which is why you need the nengo-gui package installed in your python environment. However, Nengo is also capable to be run without the graphical interface. To run a Nengo model without the GUI, simply call it with python. E.g., python my_model.py.

Hi @xchoo ,
I install in my terminal with the commands :
pip install nengo-gui
pip install nengo
Still not working for me :frowning:


Any other solution ?

So, it looks like your issue is that the appropriate folder path (i.e., the path to the nengo executable) is not on your Windows PATH environment variable. But, even if you were to fix your PATH environment variable, you’ll still have the issue that NengoGUI currently does not support Python 3.8.

To fix both of these issues, I’d recommend installing Miniconda for Windows. Note that the Python 3.8 miniconda installer will work in this case.

The advantage of using Miniconda (or Anaconda) is that it allows you to create multiple python environments on your computer. Once Miniconda is installed on your system, this is how you would install Python 3.7, and Nengo into a Miniconda environment.

First, create a Conda environment with Python 3.7. Start the Anaconda Prompt:
image
then, when the terminal window appears, do:
conda create -n <env_name> python=3.7
You’ll want to replace <env_name> with a name you’ll want to call your Conda environment. If you decide to call your environment name nengo, then do conda create -n nengo python=3.7

Next, you’ll be prompted to install a bunch of packages related to Python 3.7 (enter “y”), after which it’ll tell you that the environment has been successfully installed.
To work in an environment (you’ll need to do this step whenever you want to run nengo or any nengo models), you’ll need to first activate it with:
conda activate <env_name>

Once the environment is activated, you should see the name in the parenthesis change to your environment name:
image

In this activated environment, you can then install the nengo and nengo-gui packages as per usual:
pip install nengo nengo-gui

Once everything has been installed, you should be able to open Nengo using the nengo command. :smiley:

Just to re-iterate, once you have the Conda environment for Nengo set up, you’ll need to activate that specific environment from within the Anaconda terminal whenever you want to use it.

Thank you very much xchoo,
I went exactly according to your explanation, it finally works :slight_smile:

That’s great to hear! :smiley:

I followed this and got a new error.

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

Regarding your error, it might be possible that you have another application using the default port that Nengo is trying to use. See if this command solves your issue:

nengo --port 12345

Note that you can insert any number from 10000 to 65534 after the --port flag.

That worked! thank you so much!

1 Like