我正在尝试使用pip2.7 install cassandra-driver
进行安装,但它会因长堆栈跟踪而失败。错误是RuntimeError: maximum recursion depth exceeded while calling a Python object
。我可以安装像scikit等的东西,很好。有特殊需要吗?这是堆栈跟踪的尾部。
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
答案 0 :(得分:0)
将python安装更改为scl修复了问题。我卸载了python2.7,但清除了/ usr / local与bin和lib中所有python 2.7相关的东西。使用以下序列重新安装python27:
yum install centos-release-SCL yum安装python27 scl enable python27 bash
使用" easy_install-2.7 pip"
安装了点子现在我可以安装cassandra驱动程序......