Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
运行软件源代码会导致Python错误(LMDE 3)_Python_Debian Based_Cinnamon - Fatal编程技术网

运行软件源代码会导致Python错误(LMDE 3)

运行软件源代码会导致Python错误(LMDE 3),python,debian-based,cinnamon,Python,Debian Based,Cinnamon,我需要运行软件源GUI(不,我的工作无法通过apt或aptitude完成)。因为如果我从启动器导航,窗口将永远不会加载,所以我决定看看如果我从命令行运行它会发生什么: jason@jason-mint:~$ software-sources File "/usr/lib/linuxmint/mintSources/mintSources.py", line 48 def async(func): ^ SyntaxError: invalid syntax

我需要运行软件源GUI(不,我的工作无法通过
apt
aptitude
完成)。因为如果我从启动器导航,窗口将永远不会加载,所以我决定看看如果我从命令行运行它会发生什么:

jason@jason-mint:~$ software-sources 
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 48
    def async(func):
            ^
SyntaxError: invalid syntax
文件
mintSources.py
中的函数如下所示:

# 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
在最顶端,shebang说:
#/usr/bin/python3
。因为我的默认Python是Python2.7,所以我将shebang更改为
#/usr/bin/python
查看发生了什么,但这次出现了一个新错误:

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
一些系统信息(如果有帮助):

jason@jason-mint:~$ cat /etc/debian_version 
buster/sid
jason@jason-mint:~$ uname -r
4.19.0-4-amd64
jason@jason-mint:~$ cat /etc/debian_version 
buster/sid
jason@jason-mint:~$ uname -r
4.19.0-4-amd64