[英]Error installing pydoop with pip on Ubuntu 18.04
I am trying to install pydoop with pip on my Ubuntu 18.04 and keep getting an error "Failed building wheel for pydoop".我正在尝试在我的 Ubuntu 18.04 上使用 pip 安装 pydoop,但不断收到错误消息“pydoop 构建轮失败”。
pip install pydoop
/bin/sh: 1: hadoop: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-zqQz1I/pydoop/setup.py", line 368, in <module>
zip_safe=False,
File "/home/andrew/.local/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/andrew/.local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-build-zqQz1I/pydoop/setup.py", line 320, in run
self.build_java()
File "/tmp/pip-build-zqQz1I/pydoop/setup.py", line 301, in build_java
jb = JavaBuilder(self.build_temp, self.build_lib)
File "/tmp/pip-build-zqQz1I/pydoop/setup.py", line 199, in __init__
self.java_libs = [JavaLib()]
File "/tmp/pip-build-zqQz1I/pydoop/setup.py", line 183, in __init__
self.classpath = pydoop.hadoop_classpath()
File "pydoop/__init__.py", line 79, in hadoop_classpath
return _PATH_FINDER.hadoop_classpath()
File "pydoop/hadoop_utils.py", line 126, in hadoop_classpath
"hadoop classpath --glob", shell=True, universal_newlines=True
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'hadoop classpath --glob' returned non-zero exit status 127
It seems as though it is not recognizing the hadoop command, however, whenever I use this in the command line there is no problem.似乎它无法识别 hadoop 命令,但是,每当我在命令行中使用它时都没有问题。 I included the path to hadoop in the.bashrc file.我在 .bashrc 文件中包含了 hadoop 的路径。
As suggested in the comments, sh
is not going to use .bashrc
.正如评论中所建议的, sh
不会使用.bashrc
。 Try adding the Hadoop binaries to your PATH, eg, export PATH="${hadoop_home}/bin:${hadoop_home}/sbin:${PATH}"
尝试将 Hadoop 二进制文件添加到您的 PATH,例如export PATH="${hadoop_home}/bin:${hadoop_home}/sbin:${PATH}"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.