title: Python (source build), cant get tensorflow working
body: <p>I build python versions 3.6.10 and 3.8.2 from source on Ubuntu 18.04 and can't get pip to properly install tensorflow in virtual environments of either one</p>
  
  <p><strong>[python3.6.10]</strong></p>
  
  <p>pip --version -> 20.1</p>
  
  <p>python -c "import struct; struct.calcsize('P')* 8 --> 64</p>
  
  <blockquote>
    <p>pip install tensorflow</p>
    
    <p>ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)</p>
    
    <p>ERROR: No matching distribution found for tensorflow</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>pip install <a href="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.2.0-cp36-cp36m-manylinux2010_x86_64.whl" rel="nofollow noreferrer">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.2.0-cp36-cp36m-manylinux2010_x86_64.whl</a></p>
    
    <p>ERROR: tensorflow_cpu-2.2.0-cp36-cp36m-manylinux2010_x86_64.whl is not a supported wheel on this platform.</p>
  </blockquote>
  
  <p><strong>[Python3.8.2]</strong>
  tensorflow intsalls with pip, but get core dumps when building model</p>
  
  <pre><code> model = tf.keras.models.Sequential([
   tf.keras.layers.Flatten(input_shape=(28, 28)),
   tf.keras.layers.Dense(128, activation='relu'),
   tf.keras.layers.Dropout(0.2),
   tf.keras.layers.Dense(10)
   ])
  </code></pre>
  
  <blockquote>
    <p>python: ../Objects/typeobject.c:3707: excess_args: Assertion `PyTuple_Check(args)' failed.
    Aborted (core dumped)</p>
  </blockquote>
  
  <p>Any help would be appreciated.</p>
  
  <p>[EDIT]</p>
  
  <pre><code>pip debug --verbose (for python3.6)
  .
  pip version: pip 20.1 from venv36/lib/python3.6/site-packages/pip (python 3.6)
  sys.version: 3.6.0 (default, May  9 2020, 20:11:51) 
  [GCC 7.5.0]
  sys.executable: venv36/bin/python3
  sys.getdefaultencoding: utf-8
  sys.getfilesystemencoding: utf-8
  locale.getpreferredencoding: UTF-8
  sys.platform: linux
  sys.implementation:
    name: cpython
  'cert' config value: Not specified
  REQUESTS_CA_BUNDLE: None
  CURL_CA_BUNDLE: None
  pip._vendor.certifi.where(): venv36/lib/python3.6/site-packages/pip/_vendor/certifi/cacert.pem
  pip._vendor.DEBUNDLED: False
  vendored library versions:
    appdirs==1.4.3
    CacheControl==0.12.6
    colorama==0.4.3
    contextlib2==0.6.0.post1 (Unable to locate actual module version, using vendor.txt specified version)
    distlib==0.3.0
    distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
    html5lib==1.0.1
    ipaddress==1.0.23
    msgpack==1.0.0 (Unable to locate actual module version, using vendor.txt specified version)
    packaging==20.3
    pep517==0.8.2
    progress==1.5
    pyparsing==2.4.7
    requests==2.23.0
    certifi==2020.04.05.1
    chardet==3.0.4
    idna==2.9
    urllib3==1.25.8
    resolvelib==0.3.0
    retrying==1.3.3 (Unable to locate actual module version, using vendor.txt specified version)
    setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
    six==1.14.0
    toml==0.10.0
    webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
  
   Compatible tags: 69
    cp36-cp36dm-manylinux2014_x86_64
    cp36-cp36dm-manylinux2010_x86_64
    cp36-cp36dm-manylinux1_x86_64
    cp36-cp36dm-linux_x86_64
    cp36-abi3-manylinux2014_x86_64
    cp36-abi3-manylinux2010_x86_64
    cp36-abi3-manylinux1_x86_64
    cp36-abi3-linux_x86_64
    cp36-none-manylinux2014_x86_64
    cp36-none-manylinux2010_x86_64
    cp36-none-manylinux1_x86_64
    cp36-none-linux_x86_64
    cp35-abi3-manylinux2014_x86_64
    cp35-abi3-manylinux2010_x86_64
    cp35-abi3-manylinux1_x86_64
    cp35-abi3-linux_x86_64
    cp34-abi3-manylinux2014_x86_64
    cp34-abi3-manylinux2010_x86_64
    cp34-abi3-manylinux1_x86_64
    cp34-abi3-linux_x86_64
    cp33-abi3-manylinux2014_x86_64
    cp33-abi3-manylinux2010_x86_64
    cp33-abi3-manylinux1_x86_64
    cp33-abi3-linux_x86_64
    cp32-abi3-manylinux2014_x86_64
    cp32-abi3-manylinux2010_x86_64
    cp32-abi3-manylinux1_x86_64
    cp32-abi3-linux_x86_64
    py36-none-manylinux2014_x86_64
    py36-none-manylinux2010_x86_64
    py36-none-manylinux1_x86_64
    py36-none-linux_x86_64
    py3-none-manylinux2014_x86_64
    py3-none-manylinux2010_x86_64
    py3-none-manylinux1_x86_64
    py3-none-linux_x86_64
    py35-none-manylinux2014_x86_64
    py35-none-manylinux2010_x86_64
    py35-none-manylinux1_x86_64
    py35-none-linux_x86_64
    py34-none-manylinux2014_x86_64
    py34-none-manylinux2010_x86_64
    py34-none-manylinux1_x86_64
    py34-none-linux_x86_64
    py33-none-manylinux2014_x86_64
    py33-none-manylinux2010_x86_64
    py33-none-manylinux1_x86_64
    py33-none-linux_x86_64
    py32-none-manylinux2014_x86_64
    py32-none-manylinux2010_x86_64
    py32-none-manylinux1_x86_64
    py32-none-linux_x86_64
    py31-none-manylinux2014_x86_64
    py31-none-manylinux2010_x86_64
    py31-none-manylinux1_x86_64
    py31-none-linux_x86_64
    py30-none-manylinux2014_x86_64
    py30-none-manylinux2010_x86_64
    py30-none-manylinux1_x86_64
    py30-none-linux_x86_64
    cp36-none-any
    py36-none-any
    py3-none-any
    py35-none-any
    py34-none-any
    py33-none-any
    py32-none-any
    py31-none-any
    py30-none-any
  </code></pre>