0
我试图在CentOS 6(Hortonworks HDP物理集群,4个节点)上安装Pydoop(https://crs4.github.io/pydoop/installation.html)。我的主站上安装了Python 3.4和Python 2.6。当我把它使用Python 3安装它显示了语法错误象下面这样:CentOS 6上的Pydoop安装
[[email protected]]# python3 setup.py build
File "setup.py", line 45
print 'using setuptools version', setuptools.__version__
^
SyntaxError: Missing parentheses in call to 'print'
当我把它使用Python 2它显示了以下错误
[[email protected]]# python setup.py build
using setuptools version 35.0.2
Traceback (most recent call last):
File "setup.py", line 65, in <module>
import pydoop
File "/root/pydoop/pydoop/__init__.py", line 42, in <module>
_HADOOP_INFO = _PATH_FINDER.find() # fill the cache ASAP
File "/root/pydoop/pydoop/hadoop_utils.py", line 624, in find
info[a] = getattr(self, a)()
File "/root/pydoop/pydoop/hadoop_utils.py", line 433, in hadoop_home
_hadoop_home_from_version_cmd() or
File "/root/pydoop/pydoop/hadoop_utils.py", line 394, in
_hadoop_home_from_version_cmd
output = sp.check_output([hadoop_exec, 'version'])
AttributeError: 'module' object has no attribute 'check_output'
安装我不想从2.6升级默认的Python到2.7,因为它可能会破坏使用python2.6的yum并升级它可能会导致问题。有什么建议吗?
pydoop要求2.7,但如果不想惹你当前的安装目录,则可以使用Pyenv创建分离孤立的环境。 https://github.com/pyenv/pyenv – Raphael