Barry A. Warsaw added the comment: On Jan 18, 2017, at 10:56 AM, Jeroen Van Goey wrote:
>sudo add-apt-repository ppa:jonathonf/python-3.6 >sudo apt-get update >sudo apt-get install python3.6 > >I made a string, using the new literal string interpolation, but I supplied >an invalid format specifier. I not only got the expected "ValueError: Invalid >format specifier", but also the unexpected "ModuleNotFoundError: No module >named 'apt_pkg'". Please understand that installing Python 3.6 from a random PPA does *not* provide full support for this version of the interpreter. Python 3.6 is not yet a supported version in any version of Ubuntu (which I'm assuming your using), although we are working on it for 17.04. Very often, you can install a new Python 3 interpreter package and many things will work because the Ubuntu infrastructure shares pure-Python modules across all installed Python 3's. Technically speaking, they will all have /usr/lib/python3/dist-packages on their sys.path so any third party pure-Python module built for a support version of Python 3 will be importable by any (package-built) installed version of Python 3. But that 1) is a long way from saying that those third-party modules will work; 2) does *not* include any packages containing C extension modules, which must be rebuilt for the specific interpreter version. Supporting a new version of Python is a long process, for which we are just starting. Please engage with ubuntu-de...@ubuntu.com for details. Ubuntu does install a standard exception handler so that when Python applications and such crash, we can gather crash statistics, so that we can devote resources to fixing common problems and regressions. apport (which you see in the traceback) is that crash reporting infrastructure. apport calls apt_pkg, which is an (C++) extension module and thus won't have been built for the version of Python 3.6 you installed from that PPA, unless of course the PPA owner (who I don't know) has also done an archive-wide Python 3 rebuild. Since I'm in the process of setting that up, and I know it's quite a bit of work, I doubt that's been done for this rather random PPA. The ubuntu-devel mailing list is a better place to discuss the ongoing work to bring Python 3.6 as a supported version on Ubuntu. ---------- nosy: +barry _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29307> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com