Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-653

Can't install v2.5.8 of Python SDK

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.10
    • None
    • None
    • 1

    Description

      I attempted to install the latest PHP SDK on a CentOS v7 Linux system but it failed with the following error:

      [root@ip-10-0-126-30 ~]# sudo pip install couchbase
      DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
      Collecting couchbase
        Using cached https://files.pythonhosted.org/packages/9a/c6/da995cf19160a295730f5b975ff1c65cb9abae794e4dbc245086fb417b24/couchbase-2.5.8.tar.gz
          ERROR: Command errored out with exit status 1:
           command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k8b5DR/couchbase/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k8b5DR/couchbase/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
               cwd: /tmp/pip-install-k8b5DR/couchbase/
          Complete output (17 lines):
          Traceback (most recent call last):
            File "<string>", line 1, in <module>
            File "/tmp/pip-install-k8b5DR/couchbase/setup.py", line 240, in <module>
              **setup_kw
            File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
              _setup_distribution = dist = klass(attrs)
            File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
              self.fetch_build_eggs(attrs.pop('setup_requires'))
            File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
              parse_requirements(requires), installer=self.fetch_build_egg
            File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 601, in resolve
              requirements = list(requirements)[::-1]  # set up the stack
            File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2839, in parse_requirements
              line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
            File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2807, in scan_list
              raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
          ValueError: ('Expected version spec in', "typing; python_version<'3.7'", 'at', "; python_version<'3.7'")
          ----------------------------------------
      ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
      

      Specifying version 2.5.7 of the Python SDK works:

      [root@ip-10-0-126-30 ~]# sudo pip install couchbase==2.5.7
      DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
      Collecting couchbase==2.5.7
        Using cached https://files.pythonhosted.org/packages/38/da/629b10203f1a9b9b42bdd4554e0d436552a5ec77100499a7693df6044aa0/couchbase-2.5.7.tar.gz
      Requirement already satisfied: typing in /usr/lib/python2.7/site-packages (from couchbase==2.5.7) (3.7.4.1)
      Installing collected packages: couchbase
        Running setup.py install for couchbase ... done
      Successfully installed couchbase-2.5.7
      

      Also confirmed that I need to pip install couchbase==2.5.7 whether I use couchbase-release-1.0-4-x86_64.rpm or couchbase-release-1.0-6-x86_64.rpm

      Attachments

        For Gerrit Dashboard: PYCBC-653
        # Subject Branch Project Status CR V

        Activity

          Ellis.Breen Ellis Breen added a comment -

          This is because you are using an out of date PIP which doesn't handle conditional version specs. This should fix it:

          pip install --upgrade pip

          Ellis.Breen Ellis Breen added a comment - This is because you are using an out of date PIP which doesn't handle conditional version specs. This should fix it: pip install --upgrade pip
          perry Perry Krug added a comment -

          Hey Ellis, I'm actually seeing that pip is at the latest version and still failing to install CB:

          [root@ip-10-0-152-102 ~]# pip --version
          pip 19.2.3 from /usr/lib/python2.7/site-packages/pip (python 2.7)
          [root@ip-10-0-152-102 ~]# pip install --upgrade pip
          DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
          Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages (19.2.3)
          [root@ip-10-0-152-102 ~]# pip install couchbase
          DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
          Collecting couchbase
            Using cached https://files.pythonhosted.org/packages/9a/c6/da995cf19160a295730f5b975ff1c65cb9abae794e4dbc245086fb417b24/couchbase-2.5.8.tar.gz
              ERROR: Command errored out with exit status 1:
               command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gEh1jO/couchbase/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gEh1jO/couchbase/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
                   cwd: /tmp/pip-install-gEh1jO/couchbase/
              Complete output (17 lines):
              Traceback (most recent call last):
                File "<string>", line 1, in <module>
                File "/tmp/pip-install-gEh1jO/couchbase/setup.py", line 240, in <module>
                  **setup_kw
                File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
                  _setup_distribution = dist = klass(attrs)
                File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
                  self.fetch_build_eggs(attrs.pop('setup_requires'))
                File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
                  parse_requirements(requires), installer=self.fetch_build_egg
                File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 601, in resolve
                  requirements = list(requirements)[::-1]  # set up the stack
                File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2839, in parse_requirements
                  line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
                File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2807, in scan_list
                  raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
              ValueError: ('Expected version spec in', "typing; python_version<'3.7'", 'at', "; python_version<'3.7'")
              ----------------------------------------
          ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
          [root@ip-10-0-152-102 ~]# 
          

          perry Perry Krug added a comment - Hey Ellis, I'm actually seeing that pip is at the latest version and still failing to install CB: [root @ip - 10 - 0 - 152 - 102 ~]# pip --version pip 19.2 . 3 from /usr/lib/python2. 7 /site-packages/pip (python 2.7 ) [root @ip - 10 - 0 - 152 - 102 ~]# pip install --upgrade pip DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020 . Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7 . More details about Python 2 support in pip, can be found at https: //pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already up-to-date: pip in /usr/lib/python2. 7 /site-packages ( 19.2 . 3 ) [root @ip - 10 - 0 - 152 - 102 ~]# pip install couchbase DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020 . Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7 . More details about Python 2 support in pip, can be found at https: //pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting couchbase Using cached https: //files.pythonhosted.org/packages/9a/c6/da995cf19160a295730f5b975ff1c65cb9abae794e4dbc245086fb417b24/couchbase-2.5.8.tar.gz ERROR: Command errored out with exit status 1 : command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = ' "'" '/tmp/pip-install-gEh1jO/couchbase/setup.py '"' " '; __file__=' "'" '/tmp/pip-install-gEh1jO/couchbase/setup.py '"' " ';f=getattr(tokenize, ' "'" 'open '"' " ', open)(__file__);code=f.read().replace(' "'" '\r\n '"' " ', ' "'" '\n '"' " ');f.close();exec(compile(code, __file__, ' "'" 'exec '"' " '))' egg_info --egg-base pip-egg-info cwd: /tmp/pip-install-gEh1jO/couchbase/ Complete output ( 17 lines): Traceback (most recent call last): File "<string>" , line 1 , in <module> File "/tmp/pip-install-gEh1jO/couchbase/setup.py" , line 240 , in <module> **setup_kw File "/usr/lib64/python2.7/distutils/core.py" , line 112 , in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/site-packages/setuptools/dist.py" , line 265 , in __init__ self.fetch_build_eggs(attrs.pop( 'setup_requires' )) File "/usr/lib/python2.7/site-packages/setuptools/dist.py" , line 289 , in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.7/site-packages/pkg_resources.py" , line 601 , in resolve requirements = list(requirements)[::- 1 ] # set up the stack File "/usr/lib/python2.7/site-packages/pkg_resources.py" , line 2839 , in parse_requirements line, p, specs = scan_list(VERSION,LINE_END,line,p,( 1 , 2 ), "version spec" ) File "/usr/lib/python2.7/site-packages/pkg_resources.py" , line 2807 , in scan_list raise ValueError( "Expected " +item_name+ " in" ,line, "at" ,line[p:]) ValueError: ( 'Expected version spec in' , "typing; python_version<'3.7'" , 'at' , "; python_version<'3.7'" ) ---------------------------------------- ERROR: Command errored out with exit status 1 : python setup.py egg_info Check the logs for full command output. [root @ip - 10 - 0 - 152 - 102 ~]#
          perry Perry Krug added a comment -

          And does seem to be related to 2.5.8:

          [root@ip-10-0-152-102 ~]# pip install couchbase==2.5.8
          DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
          Collecting couchbase==2.5.8
            Using cached https://files.pythonhosted.org/packages/9a/c6/da995cf19160a295730f5b975ff1c65cb9abae794e4dbc245086fb417b24/couchbase-2.5.8.tar.gz
              ERROR: Command errored out with exit status 1:
               command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aKoRwr/couchbase/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aKoRwr/couchbase/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
                   cwd: /tmp/pip-install-aKoRwr/couchbase/
              Complete output (17 lines):
              Traceback (most recent call last):
                File "<string>", line 1, in <module>
                File "/tmp/pip-install-aKoRwr/couchbase/setup.py", line 240, in <module>
                  **setup_kw
                File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
                  _setup_distribution = dist = klass(attrs)
                File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
                  self.fetch_build_eggs(attrs.pop('setup_requires'))
                File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
                  parse_requirements(requires), installer=self.fetch_build_egg
                File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 601, in resolve
                  requirements = list(requirements)[::-1]  # set up the stack
                File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2839, in parse_requirements
                  line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
                File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2807, in scan_list
                  raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
              ValueError: ('Expected version spec in', "typing; python_version<'3.7'", 'at', "; python_version<'3.7'")
              ----------------------------------------
          ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
          [root@ip-10-0-152-102 ~]# pip install couchbase==2.5.7
          DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
          Collecting couchbase==2.5.7
            Downloading https://files.pythonhosted.org/packages/38/da/629b10203f1a9b9b42bdd4554e0d436552a5ec77100499a7693df6044aa0/couchbase-2.5.7.tar.gz (592kB)
               |████████████████████████████████| 593kB 1.8MB/s 
          Requirement already satisfied: typing in /usr/lib/python2.7/site-packages (from couchbase==2.5.7) (3.7.4.1)
          Installing collected packages: couchbase
            Running setup.py install for couchbase ... done
          Successfully installed couchbase-2.5.7
          [root@ip-10-0-152-102 ~]#

          perry Perry Krug added a comment - And does seem to be related to 2.5.8: [root @ip - 10 - 0 - 152 - 102 ~]# pip install couchbase== 2.5 . 8 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020 . Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7 . More details about Python 2 support in pip, can be found at https: //pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting couchbase== 2.5 . 8 Using cached https: //files.pythonhosted.org/packages/9a/c6/da995cf19160a295730f5b975ff1c65cb9abae794e4dbc245086fb417b24/couchbase-2.5.8.tar.gz ERROR: Command errored out with exit status 1 : command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = ' "'" '/tmp/pip-install-aKoRwr/couchbase/setup.py '"' " '; __file__=' "'" '/tmp/pip-install-aKoRwr/couchbase/setup.py '"' " ';f=getattr(tokenize, ' "'" 'open '"' " ', open)(__file__);code=f.read().replace(' "'" '\r\n '"' " ', ' "'" '\n '"' " ');f.close();exec(compile(code, __file__, ' "'" 'exec '"' " '))' egg_info --egg-base pip-egg-info cwd: /tmp/pip-install-aKoRwr/couchbase/ Complete output ( 17 lines): Traceback (most recent call last): File "<string>" , line 1 , in <module> File "/tmp/pip-install-aKoRwr/couchbase/setup.py" , line 240 , in <module> **setup_kw File "/usr/lib64/python2.7/distutils/core.py" , line 112 , in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/site-packages/setuptools/dist.py" , line 265 , in __init__ self.fetch_build_eggs(attrs.pop( 'setup_requires' )) File "/usr/lib/python2.7/site-packages/setuptools/dist.py" , line 289 , in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.7/site-packages/pkg_resources.py" , line 601 , in resolve requirements = list(requirements)[::- 1 ] # set up the stack File "/usr/lib/python2.7/site-packages/pkg_resources.py" , line 2839 , in parse_requirements line, p, specs = scan_list(VERSION,LINE_END,line,p,( 1 , 2 ), "version spec" ) File "/usr/lib/python2.7/site-packages/pkg_resources.py" , line 2807 , in scan_list raise ValueError( "Expected " +item_name+ " in" ,line, "at" ,line[p:]) ValueError: ( 'Expected version spec in' , "typing; python_version<'3.7'" , 'at' , "; python_version<'3.7'" ) ---------------------------------------- ERROR: Command errored out with exit status 1 : python setup.py egg_info Check the logs for full command output. [root @ip - 10 - 0 - 152 - 102 ~]# pip install couchbase== 2.5 . 7 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020 . Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7 . More details about Python 2 support in pip, can be found at https: //pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting couchbase== 2.5 . 7 Downloading https: //files.pythonhosted.org/packages/38/da/629b10203f1a9b9b42bdd4554e0d436552a5ec77100499a7693df6044aa0/couchbase-2.5.7.tar.gz (592kB) |████████████████████████████████| 593kB 1 .8MB/s Requirement already satisfied: typing in /usr/lib/python2. 7 /site-packages (from couchbase== 2.5 . 7 ) ( 3.7 . 4.1 ) Installing collected packages: couchbase Running setup.py install for couchbase ... done Successfully installed couchbase- 2.5 . 7 [root @ip - 10 - 0 - 152 - 102 ~]#
          Ellis.Breen Ellis Breen added a comment - - edited

          Yes, Matt backported a fix from SDK3 which ensures that typing is not installed on Python 3.7 or greater. This relies on conditional dependencies. It appears pip for Python 2.7 does not like single-quoted strings, whereas the later pip for Python 3 does.

          Try this fix:

          pip install git+http://review.couchbase.org/couchbase-python-client.git@refs/changes/50/114550/1

          Ellis.Breen Ellis Breen added a comment - - edited Yes, Matt backported a fix from SDK3 which ensures that typing is not installed on Python 3.7 or greater. This relies on conditional dependencies. It appears pip for Python 2.7 does not like single-quoted strings, whereas the later pip for Python 3 does. Try this fix: pip install git+ http://review.couchbase.org/couchbase-python-client.git@refs/changes/50/114550/1

          Ellis Breen: it looks like we accidentally skipped this for 2.5.9, but others are still hitting it. I've put it on 2.5.10 which we may want to do straight away, given the frequency.

          I'll also see if we can RN it as a known issue.

          ingenthr Matt Ingenthron added a comment - Ellis Breen : it looks like we accidentally skipped this for 2.5.9, but others are still hitting it. I've put it on 2.5.10 which we may want to do straight away, given the frequency. I'll also see if we can RN it as a known issue.

          People

            Ellis.Breen Ellis Breen
            douglas.bonser Douglas Bonser (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty