"No local packages or download links found for six>=1.4.1" error when using a pypi mirror

Bug #1297970 reported by stephen mulcahy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Ghe Rivero

Bug Description

See the following error when using a PYPI mirror .. not that it seems to find and download six 1.6.1 before barfing with an error about not being able to find a six >= 1.4.1

Downloading/unpacking six>=1.4.1 (from python-keystoneclient>=0.6.0->-r requirements.txt (line 5))
  http://.../pypi/latest/six/ uses an insecure transport scheme (http). Consider using https if ... has it available
  Downloading six-1.6.1-py2.py3-none-any.whl
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL>=0.11->-r requirements.txt (line 6))
  http://.../pypi/latest/cryptography/ uses an insecure transport scheme (http). Consider using https if ... has it available
  Running setup.py (path:/opt/stack/venvs/python-glanceclient/build/cryptography/setup.py) egg_info for package cryptography
    Couldn't find index page for 'six' (maybe misspelled?)
    No local packages or download links found for six>=1.4.1
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/opt/stack/venvs/python-glanceclient/build/cryptography/setup.py", line 113, in <module>
        "build": cffi_build,
      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/dist.py", line 264, in fetch_build_eggs
        replace_conflicting=True
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/pkg_resources.py", line 620, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/pkg_resources.py", line 858, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/pkg_resources.py", line 870, in obtain
        return installer(requirement)
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/dist.py", line 314, in fetch_build_egg
        return cmd.easy_install(req)
      File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 587, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('six>=1.4.1')
    Complete output from command python setup.py egg_info:
    Couldn't find index page for 'six' (maybe misspelled?)

No local packages or download links found for six>=1.4.1

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/opt/stack/venvs/python-glanceclient/build/cryptography/setup.py", line 113, in <module>

    "build": cffi_build,

  File "/usr/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/dist.py", line 264, in fetch_build_eggs

    replace_conflicting=True

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/pkg_resources.py", line 620, in resolve

    dist = best[req.key] = env.best_match(req, ws, installer)

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/pkg_resources.py", line 858, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/pkg_resources.py", line 870, in obtain

    return installer(requirement)

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/dist.py", line 314, in fetch_build_egg

    return cmd.easy_install(req)

  File "/opt/stack/venvs/python-glanceclient/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 587, in easy_install

    raise DistutilsError(msg)

distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('six>=1.4.1')

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /opt/stack/venvs/python-glanceclient/build/cryptography
Storing debug log for failure in /root/.pip/pip.log
++ check_break after-error run_in_target bash
++ echo after-error
++ egrep -e '(,|^)after-error(,|$)' -q
++ echo 'Starting debug shell. Exit to resume building.'
Starting debug shell. Exit to resume building.
++ echo At stage after-error
At stage after-error
++ shift
++ run_in_target bash
++ cmd='PATH=$PATH:/usr/local/bin ; bash'
++ ORIG_HOME=/root
++ export HOME=/root
++ HOME=/root
++ sudo -E chroot /tmp/image.xVYiSx3A/mnt sh -c 'PATH=$PATH:/usr/local/bin ; bash'

My config is:

export http_proxy="http://...:8080/"
export https_proxy="http://...:8080/"
export no_proxy=localhost,...
export DEVTEST_PERF_COMMENT="$(hostname): clean re-run"
# -u to avoid compression, offline to avoid network hits
export DIB_COMMON_ELEMENTS="stackuser pypi -u --offline apt-sources apt-conf use-ephemeral"
export DIB_APT_SOURCES=${HOME}/foo_sources.list
export DIB_APT_CONF=${HOME}/foo_apt.conf
export PYPI_MIRROR=http://.../pypi/latest
export PIP_INDEX_URL=${PYPI_MIRROR}
# no pypi.python.org roundtrips
export DIB_NO_PYPI_PIP=1
# local wheel mirror
export PYPI_MIRROR_URL_1=http://.../pypi/latest/Ubuntu-13.10/
# same arch as host machine, so the wheels in the mirror work
export NODE_ARCH=amd64
export NODE_DIST="ubuntu apt-conf apt-sources"

Ghe Rivero (ghe.rivero)
Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Ghe Rivero (ghe.rivero)
Revision history for this message
stephen mulcahy (stephen-mulcahy) wrote :

Contents of the local mirror http://.../pypi/latest/six/

[ ] six-1.6.1-py2.py3-none-any.whl 2014-03-20 16:18 8.4K
[ ] six-1.6.1.tar.gz 2014-03-20 16:18 24K

Revision history for this message
Gregory Haynes (greghaynes) wrote :

This is caused by not having a non-wheel mirror defined as PYPI_MIRROR_URL*. easy_install doesnt know how to handle mirrors and only mirrors which are set as an env var prefixed with PYPI_MIRROR_URL are defined in .pip/pip.conf. Your configuration only has a mirror with wheels defined, thus anything easy_installed will fail.

Changed in tripleo:
status: Triaged → Invalid
Revision history for this message
Jon-Paul Sullivan (jonpaul-sullivan) wrote :

Is it possible to make a change such that this could be turned into a more sane error message that leaves the user with a chance of understanding their mistake and rectifying it?

Changed in tripleo:
status: Invalid → Confirmed
Revision history for this message
Robert Collins (lifeless) wrote :

@JP no - we don't get typed errors out.

The pypi element docs say

"Additional mirrors can be added by exporting PYPI\_MIRROR\_URL\_1=... etc. Only
the one mirror can be used by easy-install, but since wheels need to be in the
first mirror to be used, the last listed mirror is used as the pydistutils
index. NB: The sort order for these variables is a simple string sort - if
you have more than 9 additional mirrors, some care will be needed.
"

Which is I believe sufficient to avoid this problem (if read).

Changed in tripleo:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.