Jetson Nano. Error installing Edge Impulse Linux Python SDK

Question/Issue:
I am trying to install the Edge Impulse Linux Python SDK on a Jetson Nano following this documentation
Linux Python SDK - Edge Impulse Documentation
But I have a problem when I try to install edge_impulse_linux.
Does anyone know the problem? Is there any way to solve it?
Thanks in Advance.

Project ID:
649146

Context/Use case:
I would like to learn more about Edge Impulse and I started with this sample project. Counting for Inspection and Quality Control - Nvidia Jetson Nano (TensorRT)

Steps Taken:
On this step of the Linux Python SDK - Edge Impulse Documentation

pip3 install pyaudio edge_impulse_linux

Actual Outcome:
I get this error:

File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2944, in __init__
raise RequirementParseError(str(e))
pkg_resources.RequirementParseError: Invalid requirement, parse error at "': requir'"

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-1vx7oee2/edge-impulse-linux/

Reproducibility:

  • [X] Always
  • [ ] Sometimes
  • [ ] Rarely

Environment:

  • Platform: NVIDIA Jetson Nano Developer Kit rev B01
  • Build Environment Details: JetPack 4.6.1
  • OS Version: Jetson Linux R32.7.1 / NVIDIA L4T 32.7.1 / Ubuntu 18.04
1 Like

Hi @angelo.cioffari.btc

You are missing some key dependencies here again namely the setuptools wheel, what guide are you following? please check our docs for the correct steps Edge Impulse Documentation

This looks like the step you missed but please follow the guide above

sudo apt update
sudo apt install python3-pip -y
pip3 install --upgrade pip setuptools wheel

Best

Eoin

fyi @rjames

3 Likes

Hello again @Eoin! Thank you for your reply.

I followed your steps

sudo apt update
sudo apt install python3-pip -y
pip3 install --upgrade pip setuptools wheel

got this message:

Successfully installed pip-21.3.1 setuptools-59.6.0 wheel-0.37.1

Then I follow the 2 documentations: this NVIDIA Jetson and this one Linux Python SDK(the Jetson Nano steps)

sudo apt-get install libatlas-base-dev libportaudio2 libportaudiocpp0 portaudio19-dev python3-pip
pip3 install Cython
pip3 install pyaudio edge_impulse_linux

got this message:

Successfully built pyaudio edge-impulse-linux
Installing collected packages: psutil, numpy, pyaudio, edge-impulse-linux
WARNING: The scripts f2py, f2py3 and f2py3.6 are installed in β€˜/home/jetsonnano/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
uff 0.6.9 requires protobuf>=3.3.0, but you have protobuf 3.0.0 which is incompatible.
Successfully installed edge-impulse-linux-1.0.10 numpy-1.19.5 psutil-7.0.0 pyaudio-0.2.14

seems to work. (need to investigate what this WARNING is)

what I see too, is I got a lot a red warnings on the top, when the command
pip3 install pyaudio edge_impulse_linux
was runnig. something like this (I copy here a short part, is all too long…)

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see github/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with β€˜-m pip’ instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting pyaudio
Downloading PyAudio-0.2.14.tar.gz (47 kB)
|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 47 kB 1.1 MB/s
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
Collecting edge_impulse_linux
Downloading edge_impulse_linux-1.0.12.tar.gz (11 kB)
Installing build dependencies … done
Getting requirements to build wheel … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/jetsonnano/.local/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp9h5no544
cwd: /tmp/pip-install-ntn16zl8/edge-impulse-linux_d803705e390a4e3793ef4224961a1b68
Complete output (51 lines):
Traceback (most recent call last):
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/requirements.py”, line 102, in init
req = REQUIREMENT.parseString(requirement_string)
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py”, line 1654, in parseString
raise exc
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py”, line 1644, in parseString
loc, tokens = self._parse( instring, 0 )
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py”, line 1402, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py”, line 3417, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py”, line 1406, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File β€œ/tmp/pip-build-env-wj3djl6y/overlay/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py”, line 3205, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected stringEnd (at char 4), (line:1, col:5)

During handling of the above exception, another exception occurred:

etc, etc… do you think I should ignore these warnings?

Thanks and Regards,
Angelo

1 Like

Hi @angelo.cioffari.btc

I’m pretty sure this is because you are on Jetpack 4.6.1 our Jetpack docs recommend 4.6.4 and there is up to 6.0 now. NVIDIA can be pretty difficult to manage dependencies on particularly on older versions.

ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/jetsonnano/.local/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp9h5no544
cwd: /tmp/pip-install-ntn16zl8/edge-impulse-linux_d803705e390a4e3793ef4224961a1b68
Complete output (51 lines):

Can you try:

python3 -m pip install --user --upgrade pip setuptools wheel

Can you try to update to the latest available Ubuntu and Jetpack for your Nano @angelo.cioffari.btc ?

Best

Eoin

2 Likes

Hi @Eoin,

Hmmm, Ok, you have a point here… I am trying to see how to update to JetPack SDK 4.6.4. Is not really easy, need some host machine with Ubuntu 18.04 for the NVIDIA SDK Manager 2.3.0 :face_in_clouds:

Probably will try with a virtual machine… :grimacing:

ah! btw. the webinar Anomaly Detection Anywhere / Edge AI Diagnostics Meets Satellite IoT last thursday was very cool! :raised_hands:t3:

Thanks and Regards,
Angelo

1 Like