I am in need to run the Software Sources GUI (no, my job cannot be completed through apt
or aptitude
). Since the window would never load if I navigated from the launcher, I decided to see what happens if I were to run it from the command line:
jason@jason-mint:~$ software-sources
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 48
def async(func):
^
SyntaxError: invalid syntax
The function in the file mintSources.py
looks like this:
# Used as a decorator to run things in the background
def async(func):
def wrapper(*args, **kwargs):
thread = threading.Thread(target=func, args=args, kwargs=kwargs)
thread.daemon = True
thread.start()
return thread
return wrapper
At the very top, the shebang says: #!/usr/bin/python3
. Since my default Python is Python 2.7, I changed the shebang to #!/usr/bin/python
to see what happens, only to have a new error this time:
jason@jason-mint:/etc/apt$ software-sources
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 6, in <module>
import configparser
ImportError: No module named configparser
Which means it failes in import configparser
, clearly an indication that python2.7 (my default) will not work. To clarify, I have both Python2 and Python3 available:
jason@jason-mint:~$ python --version
Python 2.7.16
jason@jason-mint:~$ python2
Python 2.7.16 (default, Apr 6 2019, 01:42:57)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
jason@jason-mint:~$ python3
Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
jason@jason-mint:~$ python
Python 2.7.16 (default, Apr 6 2019, 01:42:57)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Some system info if it helps:
jason@jason-mint:~$ cat /etc/debian_version
buster/sid
jason@jason-mint:~$ uname -r
4.19.0-4-amd64