機械学習用の環境構築を行っています。
- MacOSX10.11.6 El Capitan
- Python 3.8.2
念の為バージョンの確認です。
command
1$ python -V 2Python 3.8.2
上記環境で、
command
1$ pip install pynvx
を実行。すると下記エラーが発生しました。
Collecting pynvx Using cached pynvx-1.0.0.tar.gz (150 kB) Installing collected packages: pynvx Running setup.py install for pynvx ... error ERROR: Command errored out with exit status 1: command: /Users/<私のユーザ名>/.pyenv/versions/3.8.2/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-record-68417xm9/install-record.txt --single-version-externally-managed --compile --install-headers /Users/<私のユーザ名>/.pyenv/versions/3.8.2/include/python3.8/pynvx cwd: /private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/ Complete output (53 lines): running install running build running build_py creating build creating build/lib.macosx-10.11-x86_64-3.8 creating build/lib.macosx-10.11-x86_64-3.8/pynvx copying pynvx/__init__.py -> build/lib.macosx-10.11-x86_64-3.8/pynvx copying pynvx/pynvml.py -> build/lib.macosx-10.11-x86_64-3.8/pynvx running build_ext Traceback (most recent call last): File "/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py", line 21, in run out = subprocess.check_output(['cmake', '--version']) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py", line 68, in <module> setup( File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/command/install.py", line 545, in run self.run_command('build') File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py", line 23, in run raise RuntimeError("CMake must be installed to build the following extensions: " + RuntimeError: CMake must be installed to build the following extensions: _pynvx ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/<私のユーザ名>/.pyenv/versions/3.8.2/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-j1ir7hj0/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-record-68417xm9/install-record.txt --single-version-externally-managed --compile --install-headers /Users/<私のユーザ名>/.pyenv/versions/3.8.2/include/python3.8/pynvx Check the logs for full command output.
FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
とあったので、cmakeのインストールを試みました。
homebrewをしばらく使っていなかったので、brew updateがうまく使えなかったので、
下記サイトからcmakeをインストール(アプリケーションフォルダに移動)して再実行してみましたが、現象変わらずでした。
https://cmake.org/download/
何か他に必要な作業、怪しい箇所等ありますでしょうか?
※追記===========▼
上記サイトを参照して、
PATH="/Applications/CMake.app/Contents/bin":"$PATH"
をsource ~/.bash_profileに記述したところ、
command
1$ cmake --version 2cmake version 3.17.0
cmakeの参照まではうまくいったようです。
この状態で再度実行すると、
$ pip install pynvx Collecting pynvx Using cached pynvx-1.0.0.tar.gz (150 kB) Installing collected packages: pynvx Running setup.py install for pynvx ... error ERROR: Command errored out with exit status 1: command: /Users/<私のユーザ名>/.pyenv/versions/3.8.2/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-5q1h4yg3/pynvx/setup.py'"'"'; __file__='"'"'/private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-5q1h4yg3/pynvx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-record-34y0102h/install-record.txt --single-version-externally-managed --compile --install-headers /Users/<私のユーザ名>/.pyenv/versions/3.8.2/include/python3.8/pynvx cwd: /private/var/folders/kb/136jgc252tvbq6x86lgfx3mc0000gn/T/pip-install-5q1h4yg3/pynvx/ Complete output (72 lines): running install running build running build_py creating build creating build/lib.macosx-10.11-x86_64-3.8 creating build/lib.macosx-10.11-x86_64-3.8/pynvx copying pynvx/__init__.py -> build/lib.macosx-10.11-x86_64-3.8/pynvx copying pynvx/pynvml.py -> build/lib.macosx-10.11-x86_64-3.8/pynvx running build_ext -- The C compiler identification is AppleClang 8.0.0.8000042 -- The CXX compiler identification is AppleClang 8.0.0.8000042 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /Users/<私のユーザ名>/.pyenv/versions/3.8.2/bin/python3.8 (found version "3.8.2") -- Found PythonLibs: /Users/<私のユーザ名>/.pyenv/versions/3.8.2/lib/libpython3.8.a -- Performing Test HAS_CPP14_FLAG -- Performing Test HAS_CPP14_FLAG - Success -- pybind11 v2.3.dev0 -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- LTO enabled CMake Error at /Applications/CMake.app/Contents/share/cmake-3.17/Modules/FindCUDA.cmake:715 (message): Specify CUDA_TOOLKIT_ROOT_DIR Call Stack (most recent call first): CMakeLists.txt:8 (find_package) -- Configuring incomplete, errors occurred! 〜中略〜 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/<私のユーザ名> 〜中略〜
となりました。
CUDAの参照or設定エラーでしょうか。引き続き調査中です。
※追記ここまで===========▲