etingof / pyasn1-modules

ASN.1 modules for pyasn1 library
http://snmplabs.com/pyasn1/
BSD 2-Clause "Simplified" License
43 stars 45 forks source link

Installation error for version 0.1.2 on Python 2.7 #7

Closed jordanambra closed 7 years ago

jordanambra commented 7 years ago

Hi, this morning after the update to 0.1.2 I started receiving an error during pip install of a dependent library, google-api-python-client==1.6.2. I'm using Python 2.7, it's run as a clean Docker build, and there are no other dependencies.

Here's the relevant piece of the error trace:

Downloading/unpacking pyasn1-modules==0.1.2
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2508, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 45, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')

I was able to fix this by version locking to pyasn1-modules==0.1.1 in my pip install process.

etingof commented 7 years ago

Thanks for your report!

Can you please give me more context? I can't reproduce this problem in a fresh virtualenv so far:

$ virtualenv-2.7 x
New python executable in /home/user/x/bin/python2
Also creating executable in /home/user/x/bin/python
Installing setuptools, pip, wheel.... x/bin/
done.
$ . x/bin/activate
$ pip install google-api-python-client==1.6.2
Collecting google-api-python-client==1.6.2
  Using cached google_api_python_client-1.6.2-py2.py3-none-any.whl
Collecting six<2dev,>=1.6.1 (from google-api-python-client==1.6.2)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting httplib2<1dev,>=0.9.2 (from google-api-python-client==1.6.2)
Collecting oauth2client<5.0.0dev,>=1.5.0 (from google-api-python-client==1.6.2)
  Using cached oauth2client-4.1.2-py2.py3-none-any.whl
Collecting uritemplate<4dev,>=3.0.0 (from google-api-python-client==1.6.2)
  Using cached uritemplate-3.0.0-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client==1.6.2)
  Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client==1.6.2)
  Using cached pyasn1-0.3.4-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client==1.6.2)
  Using cached pyasn1_modules-0.1.2-py2.py3-none-any.whl
Installing collected packages: six, httplib2, pyasn1, rsa, pyasn1-modules, oauth2client, uritemplate, google-api-python-client
Successfully installed google-api-python-client-1.6.2 httplib2-0.10.3 oauth2client-4.1.2 pyasn1-0.3.4 pyasn1-modules-0.1.2 rsa-3.4.2 six-1.10.0 uritemplate-3.0.0
$
jordanambra commented 7 years ago

I can't reproduce it with a virtualenv, or even with a local Docker inside of Vagrant. It's only happening on CircleCI while building it. I'm going to put this here for documentation for now, but I understand if you don't want to go through the effort of dockerizing to test.

FROM ubuntu:trusty

RUN apt-get update && apt-get install -y \
    build-essential \
    gcc \
    git \
    libffi-dev \
    libfreetype6 \
    libfreetype6-dev \
    libjpeg-dev \
    libmemcached-dev \
    libpng-dev \
    libpq-dev \
    libssl-dev \
    python \
    python-dev \
    python-pip \
    zlib1g-dev

RUN pip install pytz==2017.2

RUN pip install \
    boto==2.48.0 \
    certifi==2017.4.17 \
    cffi==1.10.0 \
    cryptography==1.9 \
    coverage==4.4.1 \
    Django==1.11.2 \
    django-adminplus==0.5 \
    django-debug-toolbar-line-profiler==0.6.1 \
    django-debug-toolbar==1.8 \
    django-money==0.11.4 \
    django-otp==0.3.14 \
    django-otp-twilio==0.3.6 \
    django-passwords==0.3.12 \
    django-redshift-backend==0.7 \
    django-reversion==2.0.9 \
    django-suit==0.2.25 \
    django-waffle==0.11.1 \
    flake8==3.3.0 \
    google-api-python-client==1.6.2 \
    idna==2.5 \
    ipaddress==1.0.18 \
    ipython==5.4.1 \
    logentries==0.17 \
    mock==2.0.0 \
    model_mommy==1.3.2 \
    newrelic==2.86.3.70 \
    nose==1.3.7 \
    pylibmc==1.5.2 \
    onetimepass==1.0.1 \
    Pillow==4.1.1 \
    psycopg2==2.7.1 \
    qrcode==5.3 \
    raven==6.1.0 \
    requests[security]==2.18.1 \
    sendwithus==4.1.0 \
    six==1.10.0 \
    twilio==6.4.1 \
    unittest-xml-reporting==2.1.0 \
    uwsgi==2.0.15 \
    xlrd==1.0.0

docker build --rm=false -t xxx .

etingof commented 7 years ago

Well, I'm willing to research why this happens to make sure it's not a regression... Can you may be give me the whole traceback from your initial comment?

I can easily run your Dockerfile locally (will do), but if it is CircleCI which reveals this problem, then it's going to be more involving for me (as I did not use the service so far).

Interestingly, the traceback seems to be caused by the PEP440-style version specification which is supported since Python 2.6 I think...

snwight commented 7 years ago

i'm seeing the same problem suddenly this morning as well. this same build worked fine last night, about 10 hours ago ;)

i'm seeing this:


Downloading/unpacking pyasn1>=0.1.7 (from oauth2client==2.0.2->-r requirements/test.txt (line 16))
Downloading/unpacking pyasn1-modules>=0.0.5 (from oauth2client==2.0.2->-r requirements/test.txt (line 16))
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/req.py", line 1265, in prepare_files
    req_to_install.extras):
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2508, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 45, in <lambda>
    next = lambda o: o.next()
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')
a13m commented 7 years ago

I'm seeing this as well on a debian 8.9 docker image with python 2.7 this morning

jordanambra commented 7 years ago

I'm definitely on 2.7, which you can see in the pathing. Here's as much of a traceback as I can give without causing privacy issues.

Step 4 : RUN pip install     boto==2.48.0     certifi==2017.4.17     cffi==1.10.0     cryptography==1.9     coverage==4.4.1     Django==1.11.2     django-adminplus==0.5     django-debug-toolbar-line-profiler==0.6.1     django-debug-toolbar==1.8     django-money==0.11.4     django-otp==0.3.14     django-otp-twilio==0.3.6     django-passwords==0.3.12     django-redshift-backend==0.7     django-reversion==2.0.9     django-suit==0.2.25     django-waffle==0.11.1     flake8==3.3.0     google-api-python-client==1.6.2     idna==2.5     ipaddress==1.0.18     ipython==5.4.1     logentries==0.17     mock==2.0.0     model_mommy==1.3.2     newrelic==2.86.3.70     nose==1.3.7     pylibmc==1.5.2     onetimepass==1.0.1     Pillow==4.1.1     psycopg2==2.7.1     qrcode==5.3     raven==6.1.0     requests[security]==2.18.1     sendwithus==4.1.0     six==1.10.0     twilio==6.4.1     unittest-xml-reporting==2.1.0     uwsgi==2.0.15     xlrd==1.0.0
 ---> Running in 13946381483b
Downloading/unpacking boto==2.48.0
Downloading/unpacking certifi==2017.4.17
Downloading/unpacking cffi==1.10.0
  Running setup.py (path:/tmp/pip_build_root/cffi/setup.py) egg_info for package cffi

Downloading/unpacking cryptography==1.9
  Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography

    no previously-included directories found matching 'docs/_build'
    warning: no previously-included files matching '*' found under directory 'vectors'
Downloading/unpacking coverage==4.4.1
  Running setup.py (path:/tmp/pip_build_root/coverage/setup.py) egg_info for package coverage

    warning: no previously-included files found matching 'ci/appveyor.token'
    no previously-included directories found matching 'doc/_build'
    no previously-included directories found matching 'tests/eggsrc/build'
    no previously-included directories found matching 'tests/eggsrc/dist'
    no previously-included directories found matching 'tests/eggsrc/*.egg-info'
    warning: no previously-included files matching '*.py[co]' found anywhere in distribution
Downloading/unpacking Django==1.11.2
Downloading/unpacking django-adminplus==0.5
  Downloading django_adminplus-0.5-py2.py3-none-any.whl
Downloading/unpacking django-debug-toolbar-line-profiler==0.6.1
  Downloading django-debug-toolbar-line-profiler-0.6.1.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-debug-toolbar-line-profiler/setup.py) egg_info for package django-debug-toolbar-line-profiler

Downloading/unpacking django-debug-toolbar==1.8
Downloading/unpacking django-money==0.11.4
  Downloading django_money-0.11.4-py2.py3-none-any.whl
Downloading/unpacking django-otp==0.3.14
Downloading/unpacking django-otp-twilio==0.3.6
  Downloading django_otp_twilio-0.3.6-py2.py3-none-any.whl
Downloading/unpacking django-passwords==0.3.12
  Downloading django-passwords-0.3.12.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-passwords/setup.py) egg_info for package django-passwords

Downloading/unpacking django-redshift-backend==0.7
  Downloading django_redshift_backend-0.7-py2.py3-none-any.whl
Downloading/unpacking django-reversion==2.0.9
  Running setup.py (path:/tmp/pip_build_root/django-reversion/setup.py) egg_info for package django-reversion

    no previously-included directories found matching 'docs/_build'
Downloading/unpacking django-suit==0.2.25
  Running setup.py (path:/tmp/pip_build_root/django-suit/setup.py) egg_info for package django-suit

Downloading/unpacking django-waffle==0.11.1
  Downloading django_waffle-0.11.1-py2.py3-none-any.whl
Downloading/unpacking flake8==3.3.0
Downloading/unpacking google-api-python-client==1.6.2
Downloading/unpacking idna==2.5
Downloading/unpacking ipaddress==1.0.18
  Downloading ipaddress-1.0.18-py2-none-any.whl
Downloading/unpacking ipython==5.4.1
Downloading/unpacking logentries==0.17
  Downloading Logentries-0.17.tar.gz
  Running setup.py (path:/tmp/pip_build_root/logentries/setup.py) egg_info for package logentries

    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
Downloading/unpacking mock==2.0.0
Downloading/unpacking model-mommy==1.3.2
  Downloading model_mommy-1.3.2-py2.py3-none-any.whl
Downloading/unpacking newrelic==2.86.3.70
  Running setup.py (path:/tmp/pip_build_root/newrelic/setup.py) egg_info for package newrelic

Downloading/unpacking nose==1.3.7
Downloading/unpacking pylibmc==1.5.2
  Running setup.py (path:/tmp/pip_build_root/pylibmc/setup.py) egg_info for package pylibmc

    warning: no files found matching 'runtests.py'
    warning: no files found matching '*.py' under directory 'pylibmc'
Downloading/unpacking onetimepass==1.0.1
  Downloading onetimepass-1.0.1.tar.gz
  Running setup.py (path:/tmp/pip_build_root/onetimepass/setup.py) egg_info for package onetimepass

Downloading/unpacking Pillow==4.1.1
  Running setup.py (path:/tmp/pip_build_root/Pillow/setup.py) egg_info for package Pillow

    warning: no files found matching '*.sh'
    no previously-included directories found matching 'docs/_static'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.landscape.yaml'
    warning: no previously-included files found matching '.travis'
    warning: no previously-included files found matching '.travis/*'
    warning: no previously-included files found matching 'appveyor.yml'
    warning: no previously-included files found matching 'build_children.sh'
    warning: no previously-included files found matching 'tox.ini'
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
Downloading/unpacking psycopg2==2.7.1
  Running setup.py (path:/tmp/pip_build_root/psycopg2/setup.py) egg_info for package psycopg2

Downloading/unpacking qrcode==5.3
  Downloading qrcode-5.3-py2.py3-none-any.whl
Downloading/unpacking raven==6.1.0
Downloading/unpacking requests[security]==2.18.1
Downloading/unpacking sendwithus==4.1.0
  Downloading sendwithus-4.1.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/sendwithus/setup.py) egg_info for package sendwithus

    warning: no files found matching '*.txt' under directory 'docs'
Downloading/unpacking six==1.10.0
  Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking twilio==6.4.1
Downloading/unpacking unittest-xml-reporting==2.1.0
  Downloading unittest_xml_reporting-2.1.0-py2.py3-none-any.whl
Downloading/unpacking uwsgi==2.0.15
  Running setup.py (path:/tmp/pip_build_root/uwsgi/setup.py) egg_info for package uwsgi
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
      warnings.warn(msg)

Downloading/unpacking xlrd==1.0.0
  Running setup.py (path:/tmp/pip_build_root/xlrd/setup.py) egg_info for package xlrd

    warning: no files found matching 'README.html'
Downloading/unpacking pycparser (from cffi==1.10.0)
  Running setup.py (path:/tmp/pip_build_root/pycparser/setup.py) egg_info for package pycparser

    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
Downloading/unpacking asn1crypto>=0.21.0 (from cryptography==1.9)
Downloading/unpacking enum34 (from cryptography==1.9)
  Downloading enum34-1.1.6-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pytz in /usr/local/lib/python2.7/dist-packages (from Django==1.11.2)
Downloading/unpacking line-profiler>=1.0b3 (from django-debug-toolbar-line-profiler==0.6.1)
  Running setup.py (path:/tmp/pip_build_root/line-profiler/setup.py) egg_info for package line-profiler
    Could not import Cython. Using the available pre-generated C file.

Downloading/unpacking sqlparse>=0.2.0 (from django-debug-toolbar==1.8)
  Downloading sqlparse-0.2.3-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from django-money==0.11.4)
Downloading/unpacking py-moneyed>=0.7 (from django-money==0.11.4)
  Downloading py-moneyed-0.7.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/py-moneyed/setup.py) egg_info for package py-moneyed

Downloading/unpacking pyflakes>=1.5.0,<1.6.0 (from flake8==3.3.0)
Downloading/unpacking configparser (from flake8==3.3.0)
  Downloading configparser-3.5.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/configparser/setup.py) egg_info for package configparser

Downloading/unpacking mccabe>=0.6.0,<0.7.0 (from flake8==3.3.0)
  Downloading mccabe-0.6.1-py2.py3-none-any.whl
Downloading/unpacking pycodestyle>=2.0.0,<2.4.0 (from flake8==3.3.0)
Downloading/unpacking oauth2client>=1.5.0,<5.0.0dev (from google-api-python-client==1.6.2)
Downloading/unpacking uritemplate>=3.0.0,<4dev (from google-api-python-client==1.6.2)
  Downloading uritemplate-3.0.0-py2.py3-none-any.whl
Downloading/unpacking httplib2>=0.9.2,<1dev (from google-api-python-client==1.6.2)
  Running setup.py (path:/tmp/pip_build_root/httplib2/setup.py) egg_info for package httplib2

Downloading/unpacking pickleshare (from ipython==5.4.1)
  Downloading pickleshare-0.7.4-py2.py3-none-any.whl
Downloading/unpacking pathlib2 (from ipython==5.4.1)
  Downloading pathlib2-2.3.0-py2.py3-none-any.whl
Downloading/unpacking traitlets>=4.2 (from ipython==5.4.1)
Downloading/unpacking simplegeneric>0.8 (from ipython==5.4.1)
  Downloading simplegeneric-0.8.1.zip
  Running setup.py (path:/tmp/pip_build_root/simplegeneric/setup.py) egg_info for package simplegeneric

Downloading/unpacking prompt-toolkit>=1.0.4,<2.0.0 (from ipython==5.4.1)
Downloading/unpacking pygments (from ipython==5.4.1)
Downloading/unpacking pexpect (from ipython==5.4.1)
Downloading/unpacking decorator (from ipython==5.4.1)
  Downloading decorator-4.1.2-py2.py3-none-any.whl
Downloading/unpacking backports.shutil-get-terminal-size (from ipython==5.4.1)
  Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Downloading/unpacking funcsigs>=1 (from mock==2.0.0)
  Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Downloading/unpacking pbr>=0.11 (from mock==2.0.0)
Downloading/unpacking olefile (from Pillow==4.1.1)
  Running setup.py (path:/tmp/pip_build_root/olefile/setup.py) egg_info for package olefile

Downloading/unpacking contextlib2 (from raven==6.1.0)
  Downloading contextlib2-0.5.5-py2.py3-none-any.whl
Downloading/unpacking urllib3>=1.21.1,<1.22 (from requests[security]==2.18.1)
Downloading/unpacking chardet>=3.0.2,<3.1.0 (from requests[security]==2.18.1)
Downloading/unpacking pyOpenSSL>=0.14 (from requests[security]==2.18.1)
Downloading/unpacking PyJWT>=1.4.2 (from twilio==6.4.1)
  Downloading PyJWT-1.5.3-py2.py3-none-any.whl
Downloading/unpacking pyasn1>=0.1.7 (from oauth2client>=1.5.0,<5.0.0dev->google-api-python-client==1.6.2)
Downloading/unpacking rsa>=3.1.4 (from oauth2client>=1.5.0,<5.0.0dev->google-api-python-client==1.6.2)
Downloading/unpacking pyasn1-modules>=0.0.5 (from oauth2client>=1.5.0,<5.0.0dev->google-api-python-client==1.6.2)
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2508, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 45, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')

Storing debug log for failure in /root/.pip/pip.log
The command '/bin/sh -c pip install     boto==2.48.0     certifi==2017.4.17     cffi==1.10.0     cryptography==1.9     coverage==4.4.1     Django==1.11.2     django-adminplus==0.5     django-debug-toolbar-line-profiler==0.6.1     django-debug-toolbar==1.8     django-money==0.11.4     django-otp==0.3.14     django-otp-twilio==0.3.6     django-passwords==0.3.12     django-redshift-backend==0.7     django-reversion==2.0.9     django-suit==0.2.25     django-waffle==0.11.1     flake8==3.3.0     google-api-python-client==1.6.2     idna==2.5     ipaddress==1.0.18     ipython==5.4.1     logentries==0.17     mock==2.0.0     model_mommy==1.3.2     newrelic==2.86.3.70     nose==1.3.7     pylibmc==1.5.2     onetimepass==1.0.1     Pillow==4.1.1     psycopg2==2.7.1     qrcode==5.3     raven==6.1.0     requests[security]==2.18.1     sendwithus==4.1.0     six==1.10.0     twilio==6.4.1     unittest-xml-reporting==2.1.0     uwsgi==2.0.15     xlrd==1.0.0' returned a non-zero code: 2
a13m commented 7 years ago

Full reproducer from a public docker image:

$ docker run -ti golang /bin/bash
root@f9d13dd8438d:/go# apt-get update  
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [561 kB]      
Ign http://deb.debian.org jessie InRelease                                  
Get:3 http://deb.debian.org jessie-updates InRelease [145 kB]               
Get:4 http://deb.debian.org jessie Release.gpg [2373 B]                                  
Get:5 http://deb.debian.org jessie Release [148 kB]                                            
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [17.8 kB]                 
Get:7 http://deb.debian.org jessie/main amd64 Packages [9063 kB]
Fetched 10.0 MB in 7s (1353 kB/s)                                                                                         
Reading package lists... Done
root@f9d13dd8438d:/go# apt-get install python-dev python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  build-essential bzip2 dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libpython-dev libpython2.7 libpython2.7-dev
  libtimedate-perl patch python-cffi python-chardet python-colorama python-cryptography python-distlib python-html5lib
  python-ndg-httpsclient python-openssl python-pkg-resources python-ply python-pyasn1 python-pycparser python-requests
  python-setuptools python-support python-urllib3 python-wheel python2.7-dev xz-utils
Suggested packages:
  bzip2-doc debian-keyring ed diffutils-doc python-cryptography-doc python-cryptography-vectors python-genshi python-lxml
  python-openssl-doc python-openssl-dbg python-distribute python-distribute-doc python-ply-doc doc-base
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  build-essential bzip2 dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl libpython-dev libpython2.7 libpython2.7-dev
  libtimedate-perl patch python-cffi python-chardet python-colorama python-cryptography python-dev python-distlib
  python-html5lib python-ndg-httpsclient python-openssl python-pip python-pkg-resources python-ply python-pyasn1
  python-pycparser python-requests python-setuptools python-support python-urllib3 python-wheel python2.7-dev xz-utils
0 upgraded, 37 newly installed, 0 to remove and 9 not upgraded.
Need to get 25.0 MB of archives.
After this operation, 48.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian/ jessie/main libpython2.7 amd64 2.7.9-2+deb8u1 [1081 kB]
Get:2 http://deb.debian.org/debian/ jessie/main libexpat1-dev amd64 2.1.0-6+deb8u4 [126 kB]
Get:3 http://deb.debian.org/debian/ jessie/main libpython2.7-dev amd64 2.7.9-2+deb8u1 [18.6 MB]
Get:4 http://deb.debian.org/debian/ jessie/main bzip2 amd64 1.0.6-7+b3 [46.9 kB]                                          
Get:5 http://deb.debian.org/debian/ jessie/main patch amd64 2.7.5-1 [109 kB]                                              
Get:6 http://deb.debian.org/debian/ jessie/main python-support all 1.0.15 [33.6 kB]                                       
Get:7 http://deb.debian.org/debian/ jessie/main xz-utils amd64 5.1.1alpha+20120614-2+b3 [221 kB]                          
Get:8 http://deb.debian.org/debian/ jessie/main libtimedate-perl all 2.3000-2 [42.2 kB]                                   
Get:9 http://deb.debian.org/debian/ jessie/main libdpkg-perl all 1.17.27 [1075 kB]                                        
Get:10 http://deb.debian.org/debian/ jessie/main dpkg-dev all 1.17.27 [1548 kB]                                           
Get:11 http://deb.debian.org/debian/ jessie/main build-essential amd64 11.7 [7114 B]                                      
Get:12 http://deb.debian.org/debian/ jessie/main libfakeroot amd64 1.20.2-1 [44.7 kB]                                     
Get:13 http://deb.debian.org/debian/ jessie/main fakeroot amd64 1.20.2-1 [84.7 kB]                                        
Get:14 http://deb.debian.org/debian/ jessie/main libalgorithm-diff-perl all 1.19.02-3 [51.7 kB]                           
Get:15 http://deb.debian.org/debian/ jessie/main libalgorithm-diff-xs-perl amd64 0.04-3+b1 [12.2 kB]                      
Get:16 http://deb.debian.org/debian/ jessie/main libalgorithm-merge-perl all 0.08-2 [13.5 kB]                             
Get:17 http://deb.debian.org/debian/ jessie/main libfile-fcntllock-perl amd64 0.22-1+b1 [36.4 kB]                         
Get:18 http://deb.debian.org/debian/ jessie/main libpython-dev amd64 2.7.9-1 [19.6 kB]                                    
Get:19 http://deb.debian.org/debian/ jessie/main python-ply all 3.4-5 [62.9 kB]                                           
Get:20 http://deb.debian.org/debian/ jessie/main python-pycparser all 2.10+dfsg-3 [58.8 kB]                               
Get:21 http://deb.debian.org/debian/ jessie/main python-cffi amd64 0.8.6-1 [67.2 kB]                                      
Get:22 http://deb.debian.org/debian/ jessie/main python-pkg-resources all 5.5.1-1 [64.4 kB]                               
Get:23 http://deb.debian.org/debian/ jessie/main python-chardet all 2.3.0-1 [96.2 kB]                                     
Get:24 http://deb.debian.org/debian/ jessie/main python-colorama all 0.3.2-1 [20.3 kB]                                    
Get:25 http://deb.debian.org/debian/ jessie/main python-cryptography amd64 0.6.1-1+deb8u1 [164 kB]                        
Get:26 http://deb.debian.org/debian/ jessie/main python2.7-dev amd64 2.7.9-2+deb8u1 [290 kB]                              
Get:27 http://deb.debian.org/debian/ jessie/main python-dev amd64 2.7.9-1 [1182 B]                                        
Get:28 http://deb.debian.org/debian/ jessie/main python-distlib all 0.1.9-1 [113 kB]                                      
Get:29 http://deb.debian.org/debian/ jessie/main python-html5lib all 0.999-3 [84.0 kB]                                    
Get:30 http://deb.debian.org/debian/ jessie/main python-openssl all 0.14-1 [81.1 kB]                                      
Get:31 http://deb.debian.org/debian/ jessie/main python-ndg-httpsclient all 0.3.2-1 [20.5 kB]                             
Get:32 http://deb.debian.org/debian/ jessie/main python-urllib3 all 1.9.1-3 [55.4 kB]                                     
Get:33 http://deb.debian.org/debian/ jessie/main python-requests all 2.4.3-6 [204 kB]                                     
Get:34 http://deb.debian.org/debian/ jessie/main python-setuptools all 5.5.1-1 [242 kB]                                   
Get:35 http://deb.debian.org/debian/ jessie/main python-pip all 1.5.6-5 [114 kB]                                          
Get:36 http://deb.debian.org/debian/ jessie/main python-pyasn1 all 0.1.7-1 [49.3 kB]                                      
Get:37 http://deb.debian.org/debian/ jessie/main python-wheel all 0.24.0-1 [47.5 kB]                                      
Fetched 25.0 MB in 11s (2231 kB/s)                                                                                        
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libpython2.7:amd64.
(Reading database ... 14784 files and directories currently installed.)
Preparing to unpack .../libpython2.7_2.7.9-2+deb8u1_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.9-2+deb8u1) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../libexpat1-dev_2.1.0-6+deb8u4_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-6+deb8u4) ...
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack .../libpython2.7-dev_2.7.9-2+deb8u1_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.9-2+deb8u1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../bzip2_1.0.6-7+b3_amd64.deb ...
Unpacking bzip2 (1.0.6-7+b3) ...
Selecting previously unselected package patch.
Preparing to unpack .../patch_2.7.5-1_amd64.deb ...
Unpacking patch (2.7.5-1) ...
Selecting previously unselected package python-support.
Preparing to unpack .../python-support_1.0.15_all.deb ...
Unpacking python-support (1.0.15) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../xz-utils_5.1.1alpha+20120614-2+b3_amd64.deb ...
Unpacking xz-utils (5.1.1alpha+20120614-2+b3) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.17.27_all.deb ...
Unpacking libdpkg-perl (1.17.27) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.17.27_all.deb ...
Unpacking dpkg-dev (1.17.27) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_11.7_amd64.deb ...
Unpacking build-essential (11.7) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../libfakeroot_1.20.2-1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.20.2-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1_amd64.deb ...
Unpacking fakeroot (1.20.2-1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../libalgorithm-diff-perl_1.19.02-3_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.02-3) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-3+b1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-3+b1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../libalgorithm-merge-perl_0.08-2_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-2) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-1+b1_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-1+b1) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../libpython-dev_2.7.9-1_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.9-1) ...
Selecting previously unselected package python-ply.
Preparing to unpack .../python-ply_3.4-5_all.deb ...
Unpacking python-ply (3.4-5) ...
Selecting previously unselected package python-pycparser.
Preparing to unpack .../python-pycparser_2.10+dfsg-3_all.deb ...
Unpacking python-pycparser (2.10+dfsg-3) ...
Selecting previously unselected package python-cffi.
Preparing to unpack .../python-cffi_0.8.6-1_amd64.deb ...
Unpacking python-cffi (0.8.6-1) ...
Selecting previously unselected package python-pkg-resources.
Preparing to unpack .../python-pkg-resources_5.5.1-1_all.deb ...
Unpacking python-pkg-resources (5.5.1-1) ...
Selecting previously unselected package python-chardet.
Preparing to unpack .../python-chardet_2.3.0-1_all.deb ...
Unpacking python-chardet (2.3.0-1) ...
Selecting previously unselected package python-colorama.
Preparing to unpack .../python-colorama_0.3.2-1_all.deb ...
Unpacking python-colorama (0.3.2-1) ...
Selecting previously unselected package python-cryptography.
Preparing to unpack .../python-cryptography_0.6.1-1+deb8u1_amd64.deb ...
Unpacking python-cryptography (0.6.1-1+deb8u1) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../python2.7-dev_2.7.9-2+deb8u1_amd64.deb ...
Unpacking python2.7-dev (2.7.9-2+deb8u1) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../python-dev_2.7.9-1_amd64.deb ...
Unpacking python-dev (2.7.9-1) ...
Selecting previously unselected package python-distlib.
Preparing to unpack .../python-distlib_0.1.9-1_all.deb ...
Unpacking python-distlib (0.1.9-1) ...
Selecting previously unselected package python-html5lib.
Preparing to unpack .../python-html5lib_0.999-3_all.deb ...
Unpacking python-html5lib (0.999-3) ...
Selecting previously unselected package python-openssl.
Preparing to unpack .../python-openssl_0.14-1_all.deb ...
Unpacking python-openssl (0.14-1) ...
Selecting previously unselected package python-ndg-httpsclient.
Preparing to unpack .../python-ndg-httpsclient_0.3.2-1_all.deb ...
Unpacking python-ndg-httpsclient (0.3.2-1) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../python-urllib3_1.9.1-3_all.deb ...
Unpacking python-urllib3 (1.9.1-3) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../python-requests_2.4.3-6_all.deb ...
Unpacking python-requests (2.4.3-6) ...
Selecting previously unselected package python-setuptools.
Preparing to unpack .../python-setuptools_5.5.1-1_all.deb ...
Unpacking python-setuptools (5.5.1-1) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_1.5.6-5_all.deb ...
Unpacking python-pip (1.5.6-5) ...
Selecting previously unselected package python-pyasn1.
Preparing to unpack .../python-pyasn1_0.1.7-1_all.deb ...
Unpacking python-pyasn1 (0.1.7-1) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../python-wheel_0.24.0-1_all.deb ...
Unpacking python-wheel (0.24.0-1) ...
Setting up libpython2.7:amd64 (2.7.9-2+deb8u1) ...
Setting up libexpat1-dev:amd64 (2.1.0-6+deb8u4) ...
Setting up libpython2.7-dev:amd64 (2.7.9-2+deb8u1) ...
Setting up bzip2 (1.0.6-7+b3) ...
Setting up patch (2.7.5-1) ...
Setting up python-support (1.0.15) ...
Setting up xz-utils (5.1.1alpha+20120614-2+b3) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
Setting up libtimedate-perl (2.3000-2) ...
Setting up libdpkg-perl (1.17.27) ...
Setting up dpkg-dev (1.17.27) ...
Setting up build-essential (11.7) ...
Setting up libfakeroot:amd64 (1.20.2-1) ...
Setting up fakeroot (1.20.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libalgorithm-diff-perl (1.19.02-3) ...
Setting up libalgorithm-diff-xs-perl (0.04-3+b1) ...
Setting up libalgorithm-merge-perl (0.08-2) ...
Setting up libfile-fcntllock-perl (0.22-1+b1) ...
Setting up libpython-dev:amd64 (2.7.9-1) ...
Setting up python-ply (3.4-5) ...
Setting up python-pycparser (2.10+dfsg-3) ...
Setting up python-cffi (0.8.6-1) ...
Setting up python-pkg-resources (5.5.1-1) ...
Setting up python-chardet (2.3.0-1) ...
Setting up python-colorama (0.3.2-1) ...
Setting up python-cryptography (0.6.1-1+deb8u1) ...
Setting up python2.7-dev (2.7.9-2+deb8u1) ...
Setting up python-dev (2.7.9-1) ...
Setting up python-distlib (0.1.9-1) ...
Setting up python-html5lib (0.999-3) ...
Setting up python-openssl (0.14-1) ...
Setting up python-ndg-httpsclient (0.3.2-1) ...
Setting up python-urllib3 (1.9.1-3) ...
Setting up python-requests (2.4.3-6) ...
Setting up python-setuptools (5.5.1-1) ...
Setting up python-pip (1.5.6-5) ...
Setting up python-pyasn1 (0.1.7-1) ...
Setting up python-wheel (0.24.0-1) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for python-support (1.0.15) ...
root@f9d13dd8438d:/go# pip install pyasn1-modules
Downloading/unpacking pyasn1-modules
  Downloading pyasn1_modules-0.1.2-py2.py3-none-any.whl (60kB): 60kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2621, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 49, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')

Storing debug log for failure in /root/.pip/pip.log
root@f9d13dd8438d:/go# 
etingof commented 7 years ago

I think I managed to reproduce this with a really old pip (1.5.x while current is 9.x.x):

$ pip install 'pip<6.0.0'
Collecting pip<6.0.0
  Downloading pip-1.5.6-py2.py3-none-any.whl (1.0MB)
    100% |████████████████████████████████| 1.0MB 331kB/s 
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
Successfully installed pip-1.5.6
$
$ pip install pyasn1-modules
Downloading/unpacking pyasn1-modules
  Downloading pyasn1_modules-0.1.2-py2.py3-none-any.whl (60kB): 60kB downloaded
Cleaning up...
...
  File "/home/user/x/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')

I guess I should do the emergency release without the apparently too fancy ~= specifier...

snwight commented 7 years ago

oh... gee BTW i am pinned to pip 1.5.6

that's important to mention... it's historical.

etingof commented 7 years ago

Okay, give me 15 minutes for an emergency release... ;)

jordanambra commented 7 years ago

Yup, I'm just using a default Ubuntu Trusty pip. I should upgrade 😄

etingof commented 7 years ago

OK, 0.1.4 is out on PyPi.

Alert me if it needs more love and care. Thank you!

snwight commented 7 years ago

0.3.4, not 0.1.4 correct?

etingof commented 7 years ago

It is pyasn1-0.3.4 (which always worked so it stays) and now pyasn1-modules-0.1.4 (which fixes the dependency madness introduced in pyasn1-modules-0.1.2).

Does it make sense?

snwight commented 7 years ago

sadly i am still seeing the same error when i rebuild - which seems impossible!

Downloading/unpacking pyasn1>=0.1.7 (from oauth2client==2.0.2->-r requirements/test.txt (line 16))
Downloading/unpacking pyasn1-modules>=0.0.5 (from oauth2client==2.0.2->-r requirements/test.txt (line 16))
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/req.py", line 1265, in prepare_files
    req_to_install.extras):
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2508, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 45, in <lambda>
    next = lambda o: o.next()
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')
a13m commented 7 years ago

Thank you @etingof for the quick response!

etingof commented 7 years ago

@snwight Is it 0.1.4? Can you share the build log?

kensaggy commented 7 years ago

We're also seeing this on our TravisCI builds (but can't reproduce on local mac, or ubuntu)

Downloading/unpacking virtualenv==15.1.0 (from -r requirements.txt (line 1))
Downloading/unpacking panoply-python-sdk (from -r requirements.txt (line 2))
  Downloading panoply-python-sdk-1.3.4.tar.gz
  Running setup.py (path:/tmp/pip-build-zgquoP/panoply-python-sdk/setup.py) egg_info for package panoply-python-sdk

Downloading/unpacking requests==2.3.0 (from panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking oauth2client==4.1.1 (from panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking httplib2>=0.9.1 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
  Running setup.py (path:/tmp/pip-build-zgquoP/httplib2/setup.py) egg_info for package httplib2

Downloading/unpacking pyasn1>=0.1.7 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking six>=1.6.1 from https://pypi.python.org/packages/c8/0a/b6723e1bc4c516cb687841499455a8505b44607ab535be01091c0f24f079/six-1.10.0-py2.py3-none-any.whl#md5=3ab558cf5d4f7a72611d59a81a315dc8 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
  Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking rsa>=3.1.4 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking pyasn1-modules>=0.0.5 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2621, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 49, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')
snwight commented 7 years ago

i'm asking for pyasn1-modules>=0.0.5 (from oauth2client==2.0.2)

Downloading/unpacking pyasn1>=0.1.7 (from oauth2client==2.0.2->-r requirements/test.txt (line 16))
Downloading/unpacking pyasn1-modules>=0.0.5 (from oauth2client==2.0.2->-r requirements/test.txt (line 16))
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/req.py", line 1265, in prepare_files
    req_to_install.extras):
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2508, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 45, in <lambda>
    next = lambda o: o.next()
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/media/ephemeral0/jenkins/workspace/maya_pull_requests/venv/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'pyasn1 ~=0.3.4', 'at', ' ~=0.3.4')
etingof commented 7 years ago

@kensaggy This should not happen with the latest pyasn1-module-0.1.4. Can you please refresh your pyasn1-modules and try again?

snwight commented 7 years ago

ah i see @kensaggy and i are having the same originating dependent, oauth2client fwiw

etingof commented 7 years ago

@snwight That's right, that's the lower bound.

But your pip seems to use 0.1.2. Can you drop its cache to force 0.1.4?

Don't tell me that it's all being done in a clean container? ;)

snwight commented 7 years ago

heh yep it should be a fresh container from scratch on a AWS instance used only for these pull request builds, actually! i will check into this aspect more deeply right now with a fresh push (to eliminate any chance that i'm wasting your time with a cached dep)

kensaggy commented 7 years ago

@etingof Yep seems like its working now! (For us it is being done on a clean machine because its in Travis, so no cache to refresh)

Downloading/unpacking virtualenv==15.1.0 (from -r requirements.txt (line 1))
Downloading/unpacking panoply-python-sdk (from -r requirements.txt (line 2))
  Downloading panoply-python-sdk-1.3.4.tar.gz
  Running setup.py (path:/tmp/pip-build-Qw6UIu/panoply-python-sdk/setup.py) egg_info for package panoply-python-sdk

Downloading/unpacking requests==2.3.0 (from panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking oauth2client==4.1.1 (from panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking httplib2>=0.9.1 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
  Running setup.py (path:/tmp/pip-build-Qw6UIu/httplib2/setup.py) egg_info for package httplib2

Downloading/unpacking pyasn1>=0.1.7 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking six>=1.6.1 from https://pypi.python.org/packages/c8/0a/b6723e1bc4c516cb687841499455a8505b44607ab535be01091c0f24f079/six-1.10.0-py2.py3-none-any.whl#md5=3ab558cf5d4f7a72611d59a81a315dc8 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
  Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking rsa>=3.1.4 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
Downloading/unpacking pyasn1-modules>=0.0.5 (from oauth2client==4.1.1->panoply-python-sdk->-r requirements.txt (line 2))
Installing collected packages: virtualenv, panoply-python-sdk, requests, oauth2client, httplib2, pyasn1, six, rsa, pyasn1-modules
  Running setup.py install for panoply-python-sdk

  Running setup.py install for httplib2

Successfully installed virtualenv panoply-python-sdk requests oauth2client httplib2 pyasn1 six rsa pyasn1-modules
Cleaning up...

Thanks for the quick reply @etingof much appreciated!

etingof commented 7 years ago

@snwight Please, note the pyasn1-modules version being pulled and deployed. If it's 0.1.2 then it's clearly some pypi caching issue on your platform. I guess it should go away as that cache expires.

As a matter of hack, may be you can temporarily introduce a dependency on pyasn1-modules-0.1.4 in your package to update that mystical cache in the middle. Then you drop that dependency in hope that the latest pyasn1-modules will still be used.

But if it's 0.1.4 still failing... I'll get wasted tonight. ;)

snwight commented 7 years ago

thanks for the fast response @etingof i'm still having this happen so the fault is on my side, judging from @kensaggy's success ;)

snwight commented 7 years ago

so my build is working again, thanks muchly @etingof !

note, however, that i had to add a pyasn1-modules>=0.1.4 dependency to my requirements.txt to override the specification from ouath2-client which is: pyasn1-modules>=0.0.5! this is originating from my inclusion of pyOpenSSL==16.0.0

i presume this is entirely my fault for being the (unwilling and combative) user of pip 1.5.6

etingof commented 7 years ago

@snwight Just keep in mind that pyasn1-modules>=0.0.5 implies the latest available package version which is greater than 0.0.5. Somehow your build got stuck at 0.1.2, I believe you should be able to remove your dependency once a cache (?) expires...

snwight commented 7 years ago

indeed, one would hope so - still not clear to me why this is so pernicious. thanks again!

kensaggy commented 7 years ago

Did you try pip install with --no-cache-did flag?

On Thu, 7 Sep 2017 at 19:51 Steve Wight notifications@github.com wrote:

indeed, one would hope so - still not clear to me why this is so pernicious. thanks again!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etingof/pyasn1-modules/issues/7#issuecomment-327858855, or mute the thread https://github.com/notifications/unsubscribe-auth/AAP1gPtrneHmrlg9SWhr0qDHmG0MNp3Jks5sgB8OgaJpZM4PPx-_ .

snwight commented 7 years ago

unfortunately i can't set any flags at that level of granularity without going through a lot of red tape. i will ask about what's going on, for now i'm building successfully. glad to let you know the conclusion when i have one!