0
votes

I am trying to install using pip2.7 install cassandra-driver and it fails with the long stack trace. The error is RuntimeError: maximum recursion depth exceeded while calling a Python object. I can install number of things like scikit etc, just fine. Is there something special needed? Here is the tail of the stack trace.

 File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 837, in obtain
        return installer(requirement)
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 272, in fetch_build_egg
        dist = self.__class__({'script_args':['easy_install']})
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 225, in __init__
        _Distribution.__init__(self,attrs)
      File "/usr/local/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 257, in finalize_options
        ep.require(installer=self.fetch_build_egg)
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2029, in require
        working_set.resolve(self.dist.requires(self.extras),env,installer))
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 579, in resolve
        env = Environment(self.entries)
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 748, in __init__
        self.scan(search_path)
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 777, in scan
        for dist in find_distributions(item):
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1757, in find_on_path
        path_item,entry,metadata,precedence=DEVELOP_DIST
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2151, in from_location
        py_version=py_version, platform=platform, **kw
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2128, in __init__
        self.project_name = safe_name(project_name or 'Unknown')
      File "/usr/local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1139, in safe_name
        return re.sub('[^A-Za-z0-9.]+', '-', name)
      File "/usr/local/lib/python2.7/re.py", line 155, in sub
        return _compile(pattern, flags).sub(repl, string, count)
      File "/usr/local/lib/python2.7/re.py", line 235, in _compile
        cachekey = (type(key[0]),) + key
    RuntimeError: maximum recursion depth exceeded while calling a Python object
1

1 Answers

0
votes

Changing python installation to scl fixed the problem. I uninstalled the python2.7 but cleaning out /usr/local with all python 2.7 related things in bin and lib. Reinstalled python27 using the following sequence:

yum install centos-release-SCL yum install python27 scl enable python27 bash

Installed pip using "easy_install-2.7 pip"

Now I can install cassandra driver...