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 six tools:
- edge-impulse-daemon - configures devices over serial, and acts as a proxy for devices that do not have an IP connection.
- edge-impulse-uploader - allows uploading and signing local files.
- edge-impulse-data-forwarder - a very easy way to collect data from any device over a serial connection, and forward the data to Edge Impulse.
- edge-impulse-run-impulse - show the impulse running on your device.
- edge-impulse-blocks - create organizational transformation blocks.
- eta-flash-tool - to flash the Eta Compute ECM3532 AI Sensor.
- himax-flash-tool - to flash the Himax WE-I Plus.
Installation - macOS and Windows
-
Install Node.js v10 or higher on your host computer.
-
Install the CLI tools via:
$ npm install -g edge-impulse-cli
Afterwards you should have the tools available in your PATH.
Installation - Linux/Ubuntu and Raspbian OS
- Install Node.js v14 or higher on your host computer.
Alternatively, run the following commands:
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ node -v
The last command should return the node version, v14 or above.
Let's verify the node installation directory:
$ npm config get prefix
- If it returns /usr, run the following command to change the owner of the npm's default directory:
$ sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- If it returns /usr/local/, run the following commands to change npm's default directory:
$ mkdir ~/.npm-global
$ npm config set prefix '~/.npm-global'
$ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
-
Install the CLI tools via:
$ npm install -g edge-impulse-cli
Afterwards you should have the tools available in your PATH.
Troubleshooting
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:
$ npm install --global --production windows-build-tools
$ npm config set msvs_version 2015 --global
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:
$ sudo chown -R $USER /usr/local/lib/node_modules
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:
$ npm config set user root
Error: Can’t find Python executable (Windows)
If you receive an error such as:
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.
You need Python 2.7 installed on your machine. We use a binary package to handle serial communications, and this package is built using the node-gyp
build system. This build system requires Python 2.7 installed.
Updated 5 days ago