Hello everyone,
I am encountering an issue while running a Python script on my Jetson Nano (Ubuntu 18.04). The script imports the gi
module, but when I attempt to run it, I get the following error:
ModuleNotFoundError: No module named 'gi'
Steps I have followed to try and resolve the issue:
-
Installed the necessary dependencies:
I ran the following command to ensure that the required libraries were installed:sudo apt-get install -y libgirepository1.0-dev libcairo2-dev
-
Installed PyGObject via pip for Python 3.10:
I upgraded pip and installedPyGObject
for Python 3.10:python3.10 -m pip install PyGObject
-
Checked the installation:
I tested the installation in a Python 3.10 environment:import gi
This ran without issue.
-
Confirmed Python 3.10 is the default:
I made sure that Python 3.10 is being used as the default version:python --version # Output: Python 3.10.x
Despite these steps, I still encounter the error when running my script:
python3.10 deepversion.py
System Information:
- Jetson Nano Model: Jetson Nano 16GB EMMC
- Ubuntu version: 18.04
- Python version: 3.10.x
Has anyone encountered a similar issue, or can provide further guidance on resolving this?
Thank you in advance!
deepversion.py.zip (1.5 KB)