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