前提・実現したいこと
AWSのEC2
Amazon Linux2 p2.xlargeに
horovodをインストールしたい
発生している問題・エラーメッセージ
ERROR: Command errored out with exit status 1: command: /home/ec2-user/.pyenv/versions/3.5.1/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pmak6td4/horovod/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pmak6td4/horovod/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-b2j3r9ug/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-pmak6td4/horovod/ Complete output (163 lines): running install running build running build_py ...中略... copying horovod/spark/task/mpirun_exec_fn.py -> build/lib.linux-x86_64-3.5/horovod/spark/task copying horovod/spark/task/task_service.py -> build/lib.linux-x86_64-3.5/horovod/spark/task copying horovod/spark/task/__init__.py -> build/lib.linux-x86_64-3.5/horovod/spark/task running build_ext gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -std=c++11 -fPIC -O2 -Wall -I/home/ec2-user/.pyenv/versions/3.5.1/include/python3.5m -c build/temp.linux-x86_64-3.5/test_compile/test_cpp_flags.cc -o build/temp.linux-x86_64-3.5/test_compile/test_cpp_flags.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc -pthread -shared -L/home/ec2-user/.pyenv/versions/3.5.1/lib build/temp.linux-x86_64-3.5/test_compile/test_cpp_flags.o -o build/temp.linux-x86_64-3.5/test_compile/test_cpp_flags.so gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ec2-user/.pyenv/versions/3.5.1/include/python3.5m -c build/temp.linux-x86_64-3.5/test_compile/test_link_flags.cc -o build/temp.linux-x86_64-3.5/test_compile/test_link_flags.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc -pthread -shared -L/home/ec2-user/.pyenv/versions/3.5.1/lib -Wl,--version-script=horovod.lds build/temp.linux-x86_64-3.5/test_compile/test_link_flags.o -o build/temp.linux-x86_64-3.5/test_compile/test_link_flags.so INFO: Cannot find CMake, will skip compiling Horovod with Gloo. Traceback (most recent call last): File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 335, in get_mpi_flags shlex.split(show_command), universal_newlines=True).strip() File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 629, in check_output **kwargs).stdout File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 696, in run with Popen(*popenargs, **kwargs) as process: File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 950, in __init__ restore_signals, start_new_session) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 1544, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'mpicxx' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 563, in get_common_options mpi_flags = get_mpi_flags() File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 348, in get_mpi_flags '%s' % (show_command, traceback.format_exc())) distutils.errors.DistutilsPlatformError: mpicxx -show failed (see error below), is MPI in $PATH? Note: If your version of MPI has a custom command to show compilation flags, please specify it with the HOROVOD_MPICXX_SHOW environment variable. Traceback (most recent call last): File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 335, in get_mpi_flags shlex.split(show_command), universal_newlines=True).strip() File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 629, in check_output **kwargs).stdout File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 696, in run with Popen(*popenargs, **kwargs) as process: File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 950, in __init__ restore_signals, start_new_session) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/subprocess.py", line 1544, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'mpicxx' INFO: Cannot find MPI compilation flags, will skip compiling with MPI. Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 1449, in <module> scripts=['bin/horovodrun']) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/command/install.py", line 539, in run self.run_command('build') File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 49, in run _build_ext.run(self) File "/home/ec2-user/.pyenv/versions/3.5.1/lib/python3.5/distutils/command/build_ext.py", line 338, in run self.build_extensions() File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 1366, in build_extensions options = get_common_options(self) File "/tmp/pip-install-pmak6td4/horovod/setup.py", line 576, in get_common_options raise RuntimeError('One of Gloo or MPI are required for Horovod to run. Check the logs above for more info.') RuntimeError: One of Gloo or MPI are required for Horovod to run. Check the logs above for more info. ---------------------------------------- ERROR: Command errored out with exit status 1: /home/ec2-user/.pyenv/versions/3.5.1/bin/python3.5 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pmak6td4/horovod/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pmak6td4/horovod/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-b2j3r9ug/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
該当のソースコード
SSHでログインし、以下のコードを入力しました
sudo yum install git -y git clone https://github.com/yyuu/pyenv.git ~/.pyenv echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(pyenv init -)"' >> ~/.bash_profile source ~/.bash_profile sudo yum install gcc zlib-devel bzip2 bzip2-devel readline readline-devel sqlite sqlite-devel openssl openssl-devel -y pyenv install 3.5.1 pyenv global 3.5.1 pyenv rehash pip3 install horovod
あなたの回答
tips
プレビュー