2016-09-14 9 views
1

私はubuntu 16.04を使用しており、プリインストールされているpython3を削除してもう一度インストールします。 sudo apt-get -f install python3を使用している場合しかし、私はエラーを取得しています:ubuntuにpython3を再インストールする際にエラーが発生しました。

Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
python3.5 is already the newest version (3.5.2-2~16.01). 
python3.5 set to manually installed. 
The following packages were automatically installed and are no longer required: 
dictionaries-common emacsen-common gir1.2-appindicator3-0.1 gir1.2-atk-1.0 
gir1.2-atspi-2.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 
gir1.2-gtk-3.0 gir1.2-pango-1.0 hunspell-en-us libcanberra0 
libgirepository-1.0-1 libhunspell-1.3-0 libpangoxft-1.0-0 libvorbisfile3 
sound-theme-freedesktop 
Use 'sudo apt autoremove' to remove them. 
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
2 not fully installed or removed. 
After this operation, 0 B of additional disk space will be used. 
Do you want to continue? [Y/n] y 
Setting up python3 (3.5.1-3) ... 
running python rtupdate hooks for python3.5... 
dpkg-query: package 'hplip-data' is not installed 
Use dpkg --info (= dpkg-deb --info) to examine archive files, 
and dpkg --contents (= dpkg-deb --contents) to list their contents. 
Traceback (most recent call last): 
File "/usr/bin/py3clean", line 210, in <module> 
main() 
File "/usr/bin/py3clean", line 196, in main 
pfiles = set(dpf.from_package(options.package)) 
File "/usr/share/python3/debpython/files.py", line 53, in from_package 
raise Exception("cannot get content of %s" % package_name) 
Exception: cannot get content of hplip-data 
error running python rtupdate hook hplip-data 
dpkg-query: package 'python3-uno' is not installed 
Use dpkg --info (= dpkg-deb --info) to examine archive files, 
and dpkg --contents (= dpkg-deb --contents) to list their contents. 
Traceback (most recent call last): 
File "/usr/bin/py3clean", line 210, in <module> 
main() 
File "/usr/bin/py3clean", line 196, in main 
pfiles = set(dpf.from_package(options.package)) 
File "/usr/share/python3/debpython/files.py", line 53, in from_package 
raise Exception("cannot get content of %s" % package_name) 
Exception: cannot get content of python3-uno 
error running python rtupdate hook python3-uno 
dpkg-query: package 'rhythmbox-plugins' is not installed 
Use dpkg --info (= dpkg-deb --info) to examine archive files, 
and dpkg --contents (= dpkg-deb --contents) to list their contents. 
Traceback (most recent call last): 
File "/usr/bin/py3clean", line 210, in <module> 
main() 
File "/usr/bin/py3clean", line 196, in main 
pfiles = set(dpf.from_package(options.package)) 
File "/usr/share/python3/debpython/files.py", line 53, in from_package 
raise Exception("cannot get content of %s" % package_name) 
Exception: cannot get content of rhythmbox-plugins 
error running python rtupdate hook rhythmbox-plugins 
dpkg-query: package 'rhythmbox' is not installed 
Use dpkg --info (= dpkg-deb --info) to examine archive files, 
and dpkg --contents (= dpkg-deb --contents) to list their contents. 
Traceback (most recent call last): 
File "/usr/bin/py3clean", line 210, in <module> 
main() 
File "/usr/bin/py3clean", line 196, in main 
pfiles = set(dpf.from_package(options.package)) 
File "/usr/share/python3/debpython/files.py", line 53, in from_package 
raise Exception("cannot get content of %s" % package_name) 
Exception: cannot get content of rhythmbox 
error running python rtupdate hook rhythmbox 
dpkg-query: package 'totem-plugins' is not installed 
Use dpkg --info (= dpkg-deb --info) to examine archive files, 
and dpkg --contents (= dpkg-deb --contents) to list their contents. 
Traceback (most recent call last): 
File "/usr/bin/py3clean", line 210, in <module> 
main() 
File "/usr/bin/py3clean", line 196, in main 
pfiles = set(dpf.from_package(options.package)) 
File "/usr/share/python3/debpython/files.py", line 53,from_package 
raise Exception("cannot get content of %s" % package_name) 
Exception: cannot get content of totem-plugins 
error running python rtupdate hook totem-plugins 
dpkg-query: package 'ubuntu-drivers-common' is not installed 
Use dpkg --info (= dpkg-deb --info) to examine archive files, 
and dpkg --contents (= dpkg-deb --contents) to list their contents. 
Traceback (most recent call last): 
File "/usr/bin/py3clean", line 210, in <module> 
main() 
File "/usr/bin/py3clean", line 196, in main 
pfiles = set(dpf.from_package(options.package)) 
File "/usr/share/python3/debpython/files.py", line 53, in from_package 
raise Exception("cannot get content of %s" % package_name) 
Exception: cannot get content of ubuntu-drivers-common 
error running python rtupdate hook ubuntu-drivers-common 
dpkg: error processing package python3 (--configure): 
    subprocess installed post-installation script returned error exit status 4 
dpkg: dependency problems prevent configuration of dh-python: 
dh-python depends on python3:any (>= 3.3.2-2~); however: 
Package python3 is not configured yet. 

dpkg: error processing package dh-python (--configure): 
dependency problems - leaving unconfigured 
Errors were encountered while processing: 
python3 
dh-python 
E: Sub-process /usr/bin/dpkg returned an error code (1) 

私のpython 2.7を持っており、PYTHON_PATHがそれに設定されているanaconda2もインストールされています。私はすでに同じ結果でそれを変更しようとしました。私はもともとsudo apt-get install gdebi-coreを使ってgedbi-coreをインストールしようとしていて、同じエラーが発生していました。オンラインで見た後、私は試しました

sudo apt-get clean 

sudo apt-get update 

sudo apt-get remove python3.* 

私はpython3.5を再インストールしようとしています。

+0

ubuntu 16.04のGUI要素のいくつかはpython3で書かれていますが、私はそれを削除していないので、読み込んでいませんでした。最後に、私はOS全体を再インストールしなければならなかった。なぜなら、コマンドラインからpython3を再インストールしようとすると同じエラーが再び起こるからだ。 –

答えて

0

Anacondaは、Pythonインストール用に複数の環境をサポートしています。あなたが使用する必要があります。

その後
conda create -n py35 python=3.5 anaconda 

は、Pythonの3.5環境を使用するために、使用します。

activate py35 

をコマンドラインから。 (必要に応じて)あなたはまた、あなたのPythonのIDEに新しい環境を追加することができます

http://conda.pydata.org/docs/py2or3.html

:あなたはを参照することができます。新しい環境で作成したことになります。

Linux: /YOUR_ANACONDA_PATH>/envs/py35 
Windows: C:\<YOUR_ANACONDA_PATH\envs\py35 
+0

これは基本的に私がPython3自体を完全に削除するのではなく、すべきだったのです。 –

0

明らかにUbuntuのpython3パッケージで包装エラーのように見えます。 Launchpadにそれがまだない場合は報告してください。

関連する問題