繁体   English   中英

apt-get install packages 在 Ubuntu 上引入了很多 python 错误

[英]apt-get install packages introduces lots of python errors on Ubuntu

apt-get install -y my_package
一切正常,直到
Setting up my_package...
并且出现了很多 python 错误,如下所示:

Compiling ./ext/python3.9/lib/python3.9/site-packages/setuptools/installer.py ...
  File "./ext/python3.9/lib/python3.9/site-packages/setuptools/installer.py", line 77
    raise DistutilsError(str(e)) from e
                                    ^
SyntaxError: invalid syntax

我怀疑它与 python 版本有关

ls -la /usr/bin/python
/usr/bin/python -> python2.7

根据症状,听起来像是包装错误。

It looks like the package's scripts are expecting python to be Python 3 and is thus inadvertently running Python 2's compileall against Python 3 files.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM