$ python
Python 3.6.6 (default, Sep 12 2018, 18:26:19) &#160;
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import apt
&gt;&gt;&gt; import apt_pkg
&gt;&gt;&gt; apt.__file__
'/usr/lib/python3/dist-packages/apt/__init__.py'
&gt;&gt;&gt; apt.__version__
Traceback (most recent call last):
&#160;File "&lt;stdin&gt;", line 1, in &lt;module&gt;
AttributeError: module 'apt' has no attribute '__version__'
&gt;&gt;&gt; apt_pkg.__file__
'/usr/lib/python3/dist-packages/apt_pkg.cpython-36m-x86_64-linux-gnu.so'
&gt;&gt;&gt; apt_pkg.__version__
Traceback (most recent call last):
&#160;File "&lt;stdin&gt;", line 1, in &lt;module&gt;
AttributeError: module 'apt_pkg' has no attribute '__version__'
&gt;&gt;&gt;

Does it have something to do with GCC version?
The GCC on my laptop is 
$ gcc --version
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

However,  it seems the current Python is built from GCC 8.0.1 20180414 ??