I repartitioned my Latitude e6430s laptop after removing Windows 10 and now gnome-terminal does not open. Nothing happens when I press the terminal icon from the icon tray or with Ctrl+Alt+Del when gnome-terminal is set as default using
$ sudo update-alternatives --config x-terminal-emulator
There are 5 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/gnome-terminal.wrapper 40 auto mode
* 1 /usr/bin/gnome-terminal.wrapper 40 manual mode
2 /usr/bin/koi8rxterm 20 manual mode
3 /usr/bin/lxterm 30 manual mode
4 /usr/bin/uxterm 20 manual mode
5 /usr/bin/xterm 20 manual mode
Press <enter> to keep the current choice[*], or type selection number: 0
Xterm and Visual Studio terminal work.
I can open gnome-terminal from the file explorer by right clicking and opening folders in the terminal.
Reinstalled python3 and GNOME terminal.
Another thread said to use this to diagnose:
$ sudo apt-get build-dep gnome-terminal
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list
After uncommenting the dev-src lines in my sources.list file I get this message, but the GNOME terminal still doesn't open.
$ sudo apt-get build-dep gnome-terminal
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Here are the logs:
$ gnome-terminal
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)
$ ls -l /usr/bin/python3
lrwxrwxrwx 1 root root 25 Sep 19 19:08 /usr/bin/python3 -> /etc/alternatives/python3