Reputation: 499
I am trying to install pydoop with pip on my Ubuntu 18.04 and keep getting an error "Failed building wheel for 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. I included the path to hadoop in the .bashrc file.
Upvotes: 1
Views: 841
Reputation: 2985
As suggested in the comments, sh
is not going to use .bashrc
. Try adding the Hadoop binaries to your PATH, e.g., export PATH="${hadoop_home}/bin:${hadoop_home}/sbin:${PATH}"
Upvotes: 0