安裝Python遇到問題——有 6 個軟件包沒有被完全安裝或卸載。


Desktop sudo apt-get install python-matplotlib
正在讀取軟件包列表... 完成
正在分析軟件包的依賴關系樹       
正在讀取狀態信息... 完成       
python-matplotlib 已經是最新的版本。
升級了 0 個軟件包,新安裝了 0 個軟件包,要卸載 0 個軟件包,有 19 個軟件包未被升級。
有 6 個軟件包沒有被完全安裝或卸載。
解壓縮后會消耗 0 B 的額外空間。
您希望繼續執行嗎? [Y/n] Y
正在設置 python-dateutil (1.5+dfsg-1ubuntu1) ...
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 SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: 處理軟件包 python-dateutil (--configure)時出錯:
 子進程 已安裝 post-installation 腳本 返回了錯誤號 1
正在設置 python-decorator (3.4.0-2build1) ...
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 SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: 處理軟件包 python-decorator (--configure)時出錯:
 子進程 已安裝 post-installation 腳本 返回了錯誤號 1
正在設置 python-pyparsing (2.0.1+dfsg1-1build1) ...
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 SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: 處理軟件包 python-pyparsing (--configure)時出錯:
 子進程 已安裝 post-installation 腳本 返回了錯誤號 1
正在設置 python-support (1.0.15) ...
  File "/usr/sbin/update-python-modules", line 52
    print x
          ^
SyntaxError: Missing parentheses in call to 'print'
dpkg: 處理軟件包 python-support (--configure)時出錯:
 子進程 已安裝 post-installation 腳本 返回了錯誤號 1
由於已經達到 MaxReports 限制,沒有寫入 apport 報告。
                                                    dpkg: 依賴關系問題使得 python-matplotlib 的配置工作不能繼續:
 python-matplotlib 依賴於 python-dateutil;然而:
  軟件包 python-dateutil 尚未配置。
 python-matplotlib 依賴於 python-pyparsing;然而:
  軟件包 python-pyparsing 尚未配置。
 python-matplotlib 依賴於 python-support (>= 0.90.0);然而:
  軟件包 python-support 尚未配置。

dpkg: 處理軟件包 python-matplotlib (--configure)時出錯:
 依賴關系問題 - 仍未被配置
由於已經達到 MaxReports 限制,沒有寫入 apport 報告。
                                                    dpkg: 依賴關系問題使得 python-scipy 的配置工作不能繼續:
 python-scipy 依賴於 python-decorator;然而:
  軟件包 python-decorator 尚未配置。

dpkg: 處理軟件包 python-scipy (--configure)時出錯:
 依賴關系問題 - 仍未被配置
由於已經達到 MaxReports 限制,沒有寫入 apport 報告。
                                                    在處理時有錯誤發生:
 python-dateutil
 python-decorator
 python-pyparsing
 python-support
 python-matplotlib
 python-scipy
E: Sub-process /usr/bin/dpkg returned an error code (1)

原因是,我們在將python2.7升級到python3.3時,只是將/usr/local/bin目錄下修改了(使用ln -s 或者其他),然而我們的配置目錄並沒有修改..

解決方法如下

sudo apt-get clean
sudo apt-get update
sudo apt-get install --reinstall python-minimal python-lockfile

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM