Public bug reported:

I've clean installed Ubuntu-server 15/vivid

        lsb_release -rd
                Description:    Ubuntu Vivid Vervet (development branch)
                Release:        15.04
        uname -rm
                3.19.0-9-generic x86_64

python & python3 are installed

        python --version
                Python 2.7.9
        python3 --version
                Python 3.4.3

exec of any apt-get command attempting to update a python3* pkg fails
with:

        Fatal Python error: Py_Initialize: Unable to get the locale
encoding

we've now replicated the problem on two other similarly, recently
installed systems.

for example

        apt-get upgrade
                Reading package lists... Done
                Building dependency tree       
                Reading state information... Done
                Calculating upgrade... Done
                The following packages will be upgraded:
                  python3-apport python3-problem-report
                2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                6 not fully installed or removed.
                Need to get 0 B/85.9 kB of archives.
                After this operation, 1,024 B of additional disk space will be 
used.
                Do you want to continue? [Y/n] Y
                (Reading database ... 64135 files and directories currently 
installed.)
                Preparing to unpack 
.../python3-problem-report_2.16.2-0ubuntu4_all.deb ...
                Fatal Python error: Py_Initialize: Unable to get the locale 
encoding
                  File "/usr/lib/python2.7/encodings/__init__.py", line 123
                    raise CodecRegistryError,\
                                            ^
                SyntaxError: invalid syntax
                Aborted
                dpkg: warning: subprocess old pre-removal script returned error 
exit status 134
                dpkg: trying script from the new package instead ...
                Fatal Python error: Py_Initialize: Unable to get the locale 
encoding
                  File "/usr/lib/python2.7/encodings/__init__.py", line 123
                    raise CodecRegistryError,\
                                            ^
                SyntaxError: invalid syntax
                Aborted
                dpkg: error processing archive 
/var/cache/apt/archives/python3-problem-report_2.16.2-0ubuntu4_all.deb 
(--unpack):
                 subprocess new pre-removal script returned error exit status 
134
                Fatal Python error: Py_Initialize: Unable to get the locale 
encoding
                  File "/usr/lib/python2.7/encodings/__init__.py", line 123
                    raise CodecRegistryError,\
                                            ^
                SyntaxError: invalid syntax
                Aborted
                dpkg: error while cleaning up:
                 subprocess installed post-installation script returned error 
exit status 134
                Preparing to unpack .../python3-apport_2.16.2-0ubuntu4_all.deb 
...
                Fatal Python error: Py_Initialize: Unable to get the locale 
encoding
                  File "/usr/lib/python2.7/encodings/__init__.py", line 123
                    raise CodecRegistryError,\
                                            ^
                SyntaxError: invalid syntax
                Aborted
                dpkg: warning: subprocess old pre-removal script returned error 
exit status 134
                dpkg: trying script from the new package instead ...
                Fatal Python error: Py_Initialize: Unable to get the locale 
encoding
                  File "/usr/lib/python2.7/encodings/__init__.py", line 123
                    raise CodecRegistryError,\
                                            ^
                SyntaxError: invalid syntax
                Aborted
                dpkg: error processing archive 
/var/cache/apt/archives/python3-apport_2.16.2-0ubuntu4_all.deb (--unpack):
                 subprocess new pre-removal script returned error exit status 
134
                Fatal Python error: Py_Initialize: Unable to get the locale 
encoding
                  File "/usr/lib/python2.7/encodings/__init__.py", line 123
                    raise CodecRegistryError,\
                                            ^
                SyntaxError: invalid syntax
                Aborted
                dpkg: error while cleaning up:
                 subprocess installed post-installation script returned error 
exit status 134
                Errors were encountered while processing:
                 
/var/cache/apt/archives/python3-problem-report_2.16.2-0ubuntu4_all.deb
                 /var/cache/apt/archives/python3-apport_2.16.2-0ubuntu4_all.deb
                E: Sub-process /usr/bin/dpkg returned an error code (1)


not sure if this is a python3 problem, apt-get/dpkg, or other.  i
suspect python3, atm.

dpkg --list python3
        Desired=Unknown/Install/Remove/Purge/Hold
        | 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
        |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
        ||/ Name                                           Version              
        Architecture                 Description
        
+++-==============================================-============================-============================-==================================================================================================
        ii  python3                                        3.4.3-1              
        amd64                        interactive high-level object-oriented 
language (default python3 version)

apt-cache policy python3
        python3:
          Installed: 3.4.3-1
          Candidate: 3.4.3-1
          Version table:
         *** 3.4.3-1 0
                900 http://mirrors.linode.com/ubuntu/ vivid/main amd64 Packages
                100 /var/lib/dpkg/status

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1434772

Title:
  apt-get action on any python3* pkg returns "Fatal Python error:
  Py_Initialize: Unable to get the locale encoding"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1434772/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to