nano@nano-desktop:~/Desktop$ pip3 install --upgrade pip3
WARNING: The directory ‘/home/nano/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/nano/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting pip3
ERROR: Could not find a version that satisfies the requirement pip3 (from versions: none)
ERROR: No matching distribution found for pip3
WARNING: You are using pip version 19.2.2, however version 19.2.3 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
The problem is pip3 was executed as sudo without specifying/disabling a cache directory, which makes a cache directory of pip at the default location, in the user home directory, as root. That forces us to use sudo for further pip operations or to specify a different cache directory.
jetbot@jetbot:~$ sudo pip3 install Jetson.GPIO
WARNING: The directory ‘/home/jetbot/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo’s -H flag.
Requirement already satisfied: Jetson.GPIO in /usr/lib/python3/dist-packages (2.0.16)
WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.10.7 documentation