Seb*_*ian 3 add-apt-repository python3 16.04
我正在运行 Ubuntu 16.04,在我的服务器上,我有 2 个版本的 python、python3.5 和 python3.6。
我已经尝试过的是:
卸载 python3-apt
并重新安装它,没有帮助仍然是同样的错误。
编辑:在python3
我有 python3.6 运行。
添加错误:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 11, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
import apt_pkg
Run Code Online (Sandbox Code Playgroud)
就我而言,因为我安装了 2 个版本的 python, python3.5 和 python3.6 ,在 python3.6 版本上找不到该模块,所以我所做的感谢@Emmet 建议是:
nano /usr/bin/add-apt-repository
编辑的行#! /usr/bin/python3
到#! /usr/bin/python3.5
现在add-apt-repository
命令再次工作。
归档时间: |
|
查看次数: |
10884 次 |
最近记录: |