Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在ubuntu 16.04中重新安装python3时出错_Python_Ubuntu_Ubuntu 16.04 - Fatal编程技术网

在ubuntu 16.04中重新安装python3时出错

在ubuntu 16.04中重新安装python3时出错,python,ubuntu,ubuntu-16.04,Python,Ubuntu,Ubuntu 16.04,我正在使用Ubuntu16.04,我删除了预安装的python3,并希望再次安装它。但是,我在使用sudo apt get-f install 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.

我正在使用Ubuntu16.04,我删除了预安装的python3,并希望再次安装它。但是,我在使用
sudo apt get-f install 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)

现在我正在尝试重新安装python3.5

Anaconda支持多种Python安装环境。你应使用:

conda create -n py35 python=3.5 anaconda
然后,要使用Python 3.5环境,请使用:

activate py35
从命令行。你可以参考:

您还可以将新环境添加到Python IDE中(如果需要)。新环境将在以下方面创建:

 Linux: /YOUR_ANACONDA_PATH>/envs/py35
 Windows: C:\<YOUR_ANACONDA_PATH\envs\py35
Linux:/YOUR\u ANACONDA\u PATH>/envs/py35

Windows:C:\Anaconda支持多种环境用于Python安装。你应使用:

conda create -n py35 python=3.5 anaconda
然后,要使用Python 3.5环境,请使用:

activate py35
从命令行。你可以参考:

您还可以将新环境添加到Python IDE中(如果需要)。新环境将在以下方面创建:

 Linux: /YOUR_ANACONDA_PATH>/envs/py35
 Windows: C:\<YOUR_ANACONDA_PATH\envs\py35
Linux:/YOUR\u ANACONDA\u PATH>/envs/py35

Windows:C:\显然看起来像Ubuntu
python3
包中的一个打包错误。如果它不在启动板上,请将其报告给启动板。

显然看起来像Ubuntu
python3
包中的打包错误。如果启动板不存在,请将其报告给启动板。

显然,ubuntu 16.04中的一些GUI元素是用python3编写的,而且由于我删除了它,因此没有加载任何GUI元素。最后,我不得不重新安装我的整个操作系统,因为试图从命令行重新安装python3会再次出现同样的错误。因此,很明显,ubuntu 16.04中的一些GUI元素是用python3编写的,并且由于我删除了它,所以没有加载任何GUI元素。最后,我不得不重新安装整个操作系统,因为尝试从命令行重新安装python3时再次出现相同的错误。这基本上是我应该做的,而不是完全删除python3本身…这基本上是我应该做的,而不是完全删除python3本身。。。。