title: cppyy fails to install
body: <p>I am trying to install cppyy inside an Ubuntu 18.04 docker container, using a Python 3.6 environment. It works fine on a local (K)ubuntu 18.04 installation. It fails with an error about legacy build for wheel that produced no files.</p>
  
  <p>I have updated g++ inside the Docker container to make sure that that isn't the problem.</p>
  
  <p>I have updated setuptools and wheel as well.</p>
  
  <p>I've also tried <code>PIP_NO_BINARY=cppyy</code> to make sure pipenv is not using the prebuilt wheel for <code>cppyy</code>.</p>
  
  <pre><code>FROM ubuntu:18.04
  
  ENV TZ=Europe/Amsterdam
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &amp;&amp; echo $TZ &gt; /etc/timezone
  
  RUN  export LC_ALL=C.UTF-8 &amp;&amp; export LANG=C.UTF-8
  RUN apt-get update &amp;&amp; apt-get install -y python3.6
  RUN apt-get install -y python3-pip
  
  # Make sure proper symlinks are in place
  RUN if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi &amp;&amp; \
  if [ ! -e /usr/bin/python ]; then ln -sf /usr/bin/python3 /usr/bin/python; fi
  
  RUN /usr/bin/pip install --upgrade pipenv setuptools wheel
  
  RUN mkdir /config
  COPY ./config /config
  COPY ./backend /app
  
  WORKDIR /app
  RUN mkdir -p uploads
  
  # Otherwise Pip starts whining about ASCII
  ENV LC_ALL=C.UTF-8
  ENV LANG=C.UTF-8
  
  RUN apt-get install -y mysql-server libmysqlclient-dev
  
  # Install Python deps
  RUN pipenv install --clear --system --python=3.6
  </code></pre>
  
  <p>The last line fails.</p>
  
  <p>The Pipfile is as follows:</p>
  
  <pre><code>[[source]]
  url = "https://pypi.python.org/simple"
  verify_ssl = false
  name = "pypi"
  
  [global]
  no-cache-dir = false
  
  [packages]
  pandas = "*"
  numpy = "*"
  seaborn = "*"
  matplotlib = "*"
  "jinja2" = "*"
  imgkit = "*"
  wkhtmltopdf = "*"
  bokeh = "*"
  flask = "*"
  flask-socketio = "*"
  eventlet = "*"
  flask-cors = "*"
  sqlalchemy = "*"
  pyopenssl = "*"
  gunicorn = "*"
  xlrd = "*"
  mysqlclient = "*"
  sqlalchemy-utils = "*"
  python-dateutil = "*"
  pep8 = "*"
  chardet = "*"
  openpyxl = "*"
  cppyy = "*"
  
  [dev-packages]
  pylint = "*"
  python-dotenv = "*"
  mysqlclient = "*"
  matplotlib = "*"
  </code></pre>
  
  <p>and the relevant part of Pipfile.lock is as follows:</p>
  
  <pre><code>       "cppyy": {
              "hashes": [
                  "sha256:af7774eb8f7da934790b08e5e1b2b1ea514b3d1e0d07d71c3b73f6312389a473"
              ],
              "index": "pypi",
              "version": "==1.4.9"
          },
          "cppyy-backend": {
              "hashes": [
                  "sha256:3cbfb92531cce600cbd8c469bc633d00dfc7d5e3d3a8b22b1596a8db9f8e9808"
              ],
              "version": "==1.8.2"
          },
          "cppyy-cling": {
              "hashes": [
                  "sha256:064644d15ea6a9d02ba613696c567b58c85343b0b78ac035af3bd1295cf5887a",
                  "sha256:3911b9ec8697c3fa43f6519e0b2c8006b25d2696d6a72aa46179783078b0fb20",
                  "sha256:49f02c76faaf0c882777f321ac2bdda375c6deff62df8bcf3b1f6a34ddf16697",
                  "sha256:7eaedb57eea1007569b8ecc3528414442ff0fb3df32a3afc57258ac3eeca0dc4",
                  "sha256:a0a36074536be9b945e23b6e607ceb59b489d2ef38fe99547e7afb6b6dc78029"
              ],
              "version": "==6.15.2.7"
          },
          "cpycppyy": {
              "hashes": [
                  "sha256:f2386f34499ab567e02456e5238b7d6a12883a57b632c3bbb8257058194fd19c"
              ],
              "version": "==1.7.2"
          },
  </code></pre>
  
  <p>The expected result is obviously "Installation succeeded" from pipenv. The actual error message is as follows:</p>
  
  <pre class="lang-sh prettyprint-override"><code>Installing dependencies from Pipfile.lock (57997e)…
  An error occurred while installing cppyy==1.4.9 --hash=sha256:af7774eb8f7da934790b08e5e1b2b1ea514b3d1e0d07d71c3b73f6312389a473! Will try again.
  An error occurred while installing cpycppyy==1.7.2 --hash=sha256:f2386f34499ab567e02456e5238b7d6a12883a57b632c3bbb8257058194fd19c! Will try again.
  Installing initially failed dependencies…
  [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.6/dist-packages/pipenv/cli/command.py", line 254, in install
  [pipenv.exceptions.InstallError]:       editable_packages=state.installstate.editables,
  [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.6/dist-packages/pipenv/core.py", line 1874, in do_install
  [pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
  [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.6/dist-packages/pipenv/core.py", line 1253, in do_init
  [pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
  [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.6/dist-packages/pipenv/core.py", line 862, in do_install_dependencies
  [pipenv.exceptions.InstallError]:       _cleanup_procs(procs, False, failed_deps_queue, retry=False)
  [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.6/dist-packages/pipenv/core.py", line 681, in _cleanup_procs
  [pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
  [pipenv.exceptions.InstallError]: ['Looking in indexes: https://pypi.python.org/simple', 'Collecting cppyy==1.4.9 (from -r /tmp/pipenv-o4uo_7oz-requirements/pipenv-mt1pg8se-requirement.txt (line 1))', '  Using cached https://files.pythonhosted.org/packages/e2/bf/46ab78ea7b5d804832cc6de4ae0d38b4543d334d323028cc6e2df4b6ae04/cppyy-1.4.9.tar.gz', 'Building wheels for collected packages: cppyy', '  Building wheel for cppyy (setup.py): started', "  Building wheel for cppyy (setup.py): finished with status 'done'", '  Running setup.py clean for cppyy', 'Failed to build cppyy', 'Installing collected packages: cppyy', '  Running setup.py install for cppyy: started', "    Running setup.py install for cppyy: finished with status 'error'"]
  [pipenv.exceptions.InstallError]: ["WARNING: Legacy build of wheel for 'cppyy' created no files.", '  Command arguments: /usr/bin/python3 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/tmp/pip-install-41clln6n/cppyy/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d /tmp/pip-wheel-a3go9c51 --python-tag cp36', '  Command output: [use --verbose to show]', '    ERROR: Complete output from command /usr/bin/python3 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/tmp/pip-install-41clln6n/cppyy/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-77wl9so6/install-record.txt --single-version-externally-managed --compile:', '    ERROR: No eggs found in /tmp/easy_install-0dvwvzxr/CPyCppyy-1.7.2/egg-dist-tmp-94jvpfxp (setup script problem?)', '    Traceback (most recent call last):', '      File "&lt;string&gt;", line 1, in &lt;module&gt;', '      File "/tmp/pip-install-41clln6n/cppyy/setup.py", line 166, in &lt;module&gt;', '        zip_safe=False,', '      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup', '        _install_setup_requires(attrs)', '      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 139, in _install_setup_requires', '        dist.fetch_build_eggs(dist.setup_requires)', '      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 717, in fetch_build_eggs', '        replace_conflicting=True,', '      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 786, in resolve', '        raise DistributionNotFound(req, requirers)', "    pkg_resources.DistributionNotFound: The 'CPyCppyy&gt;=1.7.2' distribution was not found and is required by the application", '    ----------------------------------------', 'ERROR: Command "/usr/bin/python3 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/tmp/pip-install-41clln6n/cppyy/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-77wl9so6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-41clln6n/cppyy/']
  ERROR: ERROR: Package installation failed...
  </code></pre>
  
  <hr>
  
  <p>EDIT: the following actually works:</p>
  
  <pre class="lang-sh prettyprint-override"><code>RUN pipenv install --clear --system --python=3.6; exit 0
  RUN pipenv install --clear --system --python=3.6
  </code></pre>
  
  <p>the first install fails but the second succeeds without any trouble. Maybe this helps.</p>