I’m working with a a group to program a jetson nano on a per-designed robot sold as “Jetbot”.
I don’t understand why a script ran in CLI works fine but then I try the same script in Jupyterlab and it fails, the same applies for scripts written in Jupyterlab and later tried in CLI. It’s also the same error which indicates the library isn’t there but how does one see it but not the other? Are they accessing different directories? If so is there a way to change this?
Example code below of one that works fine from CLI but not from the lab. The error indicates it doesn’t recognize the GPIO library.
#GPIO Library #include <JetsonGPIO.h>
import Jetson.GPIO as GPIO
import time
This may or may not be related, but wanted to warn you about possible differences in command lines.
Under Linux (or any *NIX with an X11 graphics server) there is a possibility of more than one GUI server. When that is the case the software must know which server to talk to. The answer is from the “DISPLAY” environment variable: If the person running the command has a DISPLAY set, and if that person has permission to use that DISPLAY, then this is where the command renders. There are other side-effects.
As a point of mentioning this, the library required, when associated with a GPU’s X server (whether used for display purposes or used for CUDA computations), must be provided by the system providing the display. Virtual servers are quite different than remote forwarded servers (virtual servers tend to do what you expect, remote forwarding won’t be what you expect in terms of required libraries).