Installation
This Edge Impulse CLI is used to control local devices, act as a proxy to synchronise data for devices that don't have an internet connection, and to upload and convert local files. The CLI consists of seven tools:
Connect to devices without the CLI? Recent versions of Google Chrome and Microsoft Edge can connect directly to fully-supported development boards, without the CLI. See this blog post for more information.

Installation - macOS and Windows

  1. 1.
    Install Python 3 on your host computer.
  2. 2.
    Install Node.js v14 or higher on your host computer.
    • For Windows users, install the Additional Node.js tools (called Tools for Native Modules on newer versions) when prompted.
  3. 3.
    Install the CLI tools via:
    1
    npm install -g edge-impulse-cli --force
    Copied!
You should now have the tools available in your PATH.
  1. 1.
    If you haven't already, create an edge impulse account. Many of our CLI tools require the user to log in to connect with the Edge Impulse Studio.

Installation - Linux/Ubuntu and Raspbian OS

  1. 1.
    Install Python 3 on your host computer.
  2. 2.
    Install Node.js v14 or higher on your host computer.
    Alternatively, run the following commands:
    1
    curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    2
    sudo apt-get install -y nodejs
    3
    node -v
    Copied!
    The last command should return the node version, v14 or above.
    Let's verify the node installation directory:
    1
    npm config get prefix
    Copied!
    If it returns /usr/local/, run the following commands to change npm's default directory:
    1
    mkdir ~/.npm-global
    2
    npm config set prefix '~/.npm-global'
    3
    echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
    Copied!
  3. 3.
    Install the CLI tools via:
    1
    npm install -g edge-impulse-cli
    Copied!
You should now have the tools available in your PATH.
  1. 1.
    If you haven't already, create an edge impulse account. Many of our CLI tools require the user to log in to connect with the Edge Impulse Studio.

Troubleshooting

If you have issues installing the CLI you can also collect data from fully-supported development boards directly using recent versions of Google Chrome and Microsoft Edge. See this blog post on how to get started.

Error: Could not locate the bindings file. (Windows)

This error indicates an issue occurred when installing the edge-impulse-cli for the first time or you have not selected to install the addition tools when installing NodeJS (not selected by default).
Remove NodeJS and install it again selecting the option:
Re-install the CLI via
1
npm uninstall -g edge-impulse-cli
2
npm install -g edge-impulse-cli
Copied!

Tools version "2.0" is unrecognized (Windows)

If you receive the following error: The tools version "2.0" is unrecognized. Available tools versions are "4.0", launch a new command window as administrator and run:
1
npm install --global --production windows-build-tools
2
npm config set msvs_version 2015 --global
Copied!

EACCES: permission denied, access '/usr/local/lib/node_modules' (macOS)

This is indication that the node_modules is not owned by you, but rather by root. This is probably not what you want. To fix this, run:
1
sudo chown -R $USER /usr/local/lib/node_modules
Copied!

EACCES user "nobody" does not have permission to access the dev dir (Linux)

Try to set the npm user to root and re-run the installation command. You can do this via:
1
npm config set user root
Copied!

Error: Can’t find Python executable (Windows)

If you receive an error such as:
1
gyp ERR! stack Error: Can’t find Python executable “C:\Users\vale.windows-build-tools\python27\python.exe”, you can set the PYTHON env variable.
Copied!
You're running an older version of node-gyp (a way to build binary packages). Upgrade via:
1
npm install [email protected] -g
Copied!

The module XXX was compiled against a different Node.js version

This error occurs when you have upgraded Node.js since installing the Edge Impulse CLI. Re-install the CLI via:
1
npm uninstall -g edge-impulse-cli
2
npm install -g edge-impulse-cli
Copied!
Which will rebuild the dependencies.

Error: "gyp: No Xcode or CLT version detected!" (macOS)

This can happen even though you have Xcode CLT installed if you've updated macOS since your install. Follow this guide to reinstall Xcode CLT.

Failed to authenticate with Edge Impulse read ECONNRESET

If you see this error message and you're behind a proxy you will need to set your proxy settings via:
Windows
1
set HTTPS_PROXY=...
2
edge-impulse-daemon
Copied!
macOS, Linux
1
HTTPS_PROXY=... edge-impulse-daemon
Copied!

ENOENT: no such file or directory, access ‘~/.npm-global/lib/node_modules/edge-impulse-cli’ (Linux)

Manually delete the Edge Impulse directory from node_modules and reinstall:
1
cd ~/.npm-global/lib/node_modules
2
rm -rf edge-impulse-cli
3
npm install -g edge-impulse-cli
Copied!