首页 > 编程 > Python > 正文

python 安裝pip的反思

2019-11-08 01:22:38
字体:
来源:转载
供稿:网友
/var/cache/debconf/config.dat is locked by another PRocess: Resource temporarily unavailable

解決:

sudo rm /var/cache/debconf/*.dat

來源: http://askUbuntu.com/questions/136881/debconf-dbdriver-config-config-dat-is-locked-by-another-process-resource-t

tengxing@yjxx-Lenovo:/var/cache/apt/archives$ sudo apt-get install python-pip正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 python-pip 已经是最新版 (8.1.1-2ubuntu0.4)。升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 352 个软件包未被升级。有 23 个软件包没有被完全安装或卸载。解压缩后会消耗 0 B 的额外空间。您希望继续执行吗? [Y/n] ydebconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable正在设置 cython (0.23.4-0ubuntu5) ...Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in <module> from debpython.version import SUPPORTED, debsorted, vrepr, / File "/usr/share/python/debpython/version.py", line 24, in <module> from ConfigParser import SafeConfigParserImportError: No module named 'ConfigParser'

解決: 更換python到python2

sudo rm /usr/bin/pythonsudo ln -s /usr/bin/python2 python

dpkg的解決策略

sudo apt-get autocleansudo apt-get cleansudo apt-get autoremovecheck更新管理器,看是哪个软件包的问题,删了再装或装过再删。重启后再试。 用VirtualBox吧,用它虚拟windows,那么在win下才能用的软件就可以用了,方便简单。

反思:

1:看報錯很重要 2:錯誤解決後應該反思,總結,做好筆記 3:理性看待問題 4:決定安裝一個虛擬機,可以隨意的玩耍了,玩壞了直接uninstall.


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表