I am on ubuntu 14.04 and I accidentally deleted python3.4
I am trying
apt-get install python3.4
dpkg-reconfigure -a
apt-get install -f
But I am seeing the following errors
dpkg: error processing package dh-python (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3.4-minimal
python3-minimal
python3.4
python3
python3-pkg-resources
python-chardet-whl
python-pip-whl
python3-chardet
python3-colorama
python3.4-dev
python3-dev
python3-distlib
python3-six
python3-html5lib
python3-urllib3
python3-requests
python3-setuptools
python3-pip
python3-wheel
dh-python
E: Sub-process /usr/bin/dpkg returned an error code (1)
I also tried to completely remove python3.4 using
apt-get remove --purge python3.4
and reinstalling. but it gives me the following errors
Rebuilding /usr/share/applications/bamf-2.index...
Setting up python3.4-minimal (3.4.3-1ubuntu1~14.04.3) ...
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted
dpkg: error processing package python3.4-minimal (--configure):
subprocess installed post-installation script returned error exit status 134
dpkg: dependency problems prevent configuration of python3.4:
python3.4 depends on python3.4-minimal (= 3.4.3-1ubuntu1~14.04.3); however:
Package python3.4-minimal is not configured yet.
dpkg: error processing package python3.4 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3.4-minimal
python3.4
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can anyone help me with this?
output for @Nodak 's answer:
Rebuilding /usr/share/applications/bamf-2.index...
Setting up python3.4-minimal (3.4.3-1ubuntu1~14.04.3) ...
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted
dpkg: error processing package python3.4-minimal (--configure):
subprocess installed post-installation script returned error exit status 134
dpkg: dependency problems prevent configuration of python3.4:
python3.4 depends on python3.4-minimal (= 3.4.3-1ubuntu1~14.04.3); however:
Package python3.4-minimal is not configured yet.
dpkg: error processing package python3.4 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-minimal:
python3-minimal depends on python3.4-minimal (>= 3.4.0-0~); however:
Package python3.4-minimal is not configured yet.
dpkg: error processing package python3-minimal (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
python3 depends on python3.4 (>= 3.4.0-0~); however:
Package python3.4 is not configured yet.
python3 depends on python3-minimal (= 3.4.0-0ubuntu2); however:
Package python3-minimal is not configured yet.
dpkg: error processing package python3 (--configure):
dependency problems - leaving unconfigured
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.4-minimal
python3.4
python3-minimal
python3
dh-python
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is the output when I run dpkg-reconfigure -a
dpkg-reconfigure -a
acpid stop/waiting
acpid start/running, process 26874
avahi-daemon stop/waiting
avahi-daemon start/running, process 27149
Rebuilding /usr/share/applications/bamf-2.index...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
update-initramfs: deferring update (trigger activated)
cgroup-lite stop/waiting
cgroup-lite start/running
/var/lib/dpkg/info/compiz.config: 1: /var/lib/dpkg/info/compiz.config: [general]: not found
/var/lib/dpkg/info/compiz.config: 2: /var/lib/dpkg/info/compiz.config: backend: not found
/var/lib/dpkg/info/compiz.config: 3: /var/lib/dpkg/info/compiz.config: plugin_list_autosort: not found
/var/lib/dpkg/info/compiz.config: 5: /var/lib/dpkg/info/compiz.config: [gnome_session]: not found
/var/lib/dpkg/info/compiz.config: 6: /var/lib/dpkg/info/compiz.config: backend: not found
/var/lib/dpkg/info/compiz.config: 7: /var/lib/dpkg/info/compiz.config: integration: not found
/var/lib/dpkg/info/compiz.config: 8: /var/lib/dpkg/info/compiz.config: plugin_list_autosort: not found
/var/lib/dpkg/info/compiz.config: 9: /var/lib/dpkg/info/compiz.config: profile: not found
/var/lib/dpkg/info/compiz.config: 11: /var/lib/dpkg/info/compiz.config: [general_ubuntu]: not found
/var/lib/dpkg/info/compiz.config: 12: /var/lib/dpkg/info/compiz.config: backend: not found
/var/lib/dpkg/info/compiz.config: 13: /var/lib/dpkg/info/compiz.config: integration: not found
/var/lib/dpkg/info/compiz.config: 14: /var/lib/dpkg/info/compiz.config: plugin_list_autosort: not found
/var/lib/dpkg/info/compiz.config: 15: /var/lib/dpkg/info/compiz.config: profile: not found
sudo apt-get install python3
and/orsudo apt-get install python3-minimal
? – Nodak Dec 21 '15 at 02:58