質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

解決済

1回答

2813閲覧

32bit版 lightgbmインストールエラー回避法を教えてください

hi_chan

総合スコア0

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2021/08/28 13:07

ラズパイ3BにlightGBMを実装したいです

使用エッジ:ラズパイ3B 32bit
python3.7

lightGBM自体は64bit推奨という事を理解した上で、わけあって32bitに
インストールしようとしています。
諸々のアップグレードは行った上で以下の記述で実行しました。

###入力コマンド

pip3 install lightgbm --install-option = -bit32

エラーメッセージ

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated and has no effect anymore. pip 21.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333. /usr/local/lib/python3.7/dist-packages/pip/_internal/commands/install.py:229: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option. cmdoptions.check_install_build_global(options) Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting lightgbm Using cached lightgbm-3.2.1.tar.gz (1.5 MB) Requirement already satisfied: numpy in ./.local/lib/python3.7/site-packages (from lightgbm) (1.21.2) Requirement already satisfied: scikit-learn!=0.22.0 in ./.local/lib/python3.7/site-packages (from lightgbm) (0.24.2) Requirement already satisfied: scipy in ./.local/lib/python3.7/site-packages (from lightgbm) (1.7.1) Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from lightgbm) (0.32.3) Requirement already satisfied: joblib>=0.11 in ./.local/lib/python3.7/site-packages (from scikit-learn!=0.22.0->lightgbm) (1.0.1) Requirement already satisfied: threadpoolctl>=2.0.0 in ./.local/lib/python3.7/site-packages (from scikit-learn!=0.22.0->lightgbm) (2.2.0) Skipping wheel build for lightgbm, due to binaries being disabled for it. Installing collected packages: lightgbm Running setup.py install for lightgbm ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s0s5ro3u/lightgbm_026a8b71d26b48498222335ea0b2c613/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s0s5ro3u/lightgbm_026a8b71d26b48498222335ea0b2c613/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nsaf5cmx/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/lightgbm = cwd: /tmp/pip-install-s0s5ro3u/lightgbm_026a8b71d26b48498222335ea0b2c613/ Complete output (1 lines): invalid command name '=' ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s0s5ro3u/lightgbm_026a8b71d26b48498222335ea0b2c613/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s0s5ro3u/lightgbm_026a8b71d26b48498222335ea0b2c613/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nsaf5cmx/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/lightgbm = Check the logs for full command output.

どのように対処したら良いか、ご教授頂きたいです。
よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hi_chan

2021/08/28 13:53

ありがとうございます。 上記の通りコマンド入力したところ、下記のようなエラーとなりました。 /usr/local/lib/python3.7/dist-packages/pip/_internal/commands/install.py:229: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option. cmdoptions.check_install_build_global(options) Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting lightgbm Using cached lightgbm-3.2.1.tar.gz (1.5 MB) Requirement already satisfied: numpy in ./.local/lib/python3.7/site-packages (from lightgbm) (1.21.2) Requirement already satisfied: scikit-learn!=0.22.0 in ./.local/lib/python3.7/site-packages (from lightgbm) (0.24.2) Requirement already satisfied: scipy in ./.local/lib/python3.7/site-packages (from lightgbm) (1.7.1) Requirement already satisfied: wheel in /usr/lib/python3/dist-packages (from lightgbm) (0.32.3) Requirement already satisfied: threadpoolctl>=2.0.0 in ./.local/lib/python3.7/site-packages (from scikit-learn!=0.22.0->lightgbm) (2.2.0) Requirement already satisfied: joblib>=0.11 in ./.local/lib/python3.7/site-packages (from scikit-learn!=0.22.0->lightgbm) (1.0.1) Skipping wheel build for lightgbm, due to binaries being disabled for it. Installing collected packages: lightgbm Running setup.py install for lightgbm ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7d15l5jp/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/lightgbm --bit32 cwd: /tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/ Complete output (39 lines): running install WARNING:LightGBM:You're installing 32-bit version. This version is slow and untested, so use it on your own risk. INFO:LightGBM:Starting to compile the library. INFO:LightGBM:Starting to compile with CMake. Traceback (most recent call last): File "/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py", line 107, in silent_call subprocess.check_call(cmd, stderr=log, stdout=log) File "/usr/lib/python3.7/subprocess.py", line 342, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python3.7/subprocess.py", line 323, in call with Popen(*popenargs, **kwargs) as p: File "/usr/lib/python3.7/subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py", line 379, in <module> 'Topic :: Scientific/Engineering :: Artificial Intelligence']) File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py", line 253, in run nomp=self.nomp, bit32=self.bit32, integrated_opencl=self.integrated_opencl) File "/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py", line 199, in compile_cpp silent_call(cmake_cmd, raise_error=True, error_msg='Please install CMake and all required dependencies first') File "/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py", line 111, in silent_call raise Exception("\n".join((error_msg, LOG_NOTICE))) Exception: Please install CMake and all required dependencies first The full version of error log was saved into /home/pi/LightGBM_compilation.log ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8s3vo7f2/lightgbm_bbd2bc0f0e2f473ab4ed6ec0d2fb7cda/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-7d15l5jp/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/lightgbm --bit32 Check the logs for full command output.
jbpb0

2021/08/28 14:02

> Please install CMake and all required dependencies first をやってください > The full version of error log was saved into /home/pi/LightGBM_compilation.log も確認してください
hi_chan

2021/08/29 05:29

jbpb0さん、度々ありがとうございます。 ①> Please install CMake and all required dependencies first pip3 install CMake を行い、ver3.21.2 のcmakeがインストールされました。 ②ログの確認をしましたが、何も記入されていませんでした。 再度、pip3 install lightgbm --install-option=--bit32 を実施したところ、 エラーは起きないものの、実行後フリーズしてしまいます。 その際のログは、下記の通りです。 -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Performing Test MM_PREFETCH -- Performing Test MM_PREFETCH - Failed -- Performing Test MM_MALLOC -- Performing Test MM_MALLOC - Failed -- Configuring done -- Generating done -- Build files have been written to: /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/build_cpp [ 5%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/boosting.cpp.o [ 5%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/gbdt.cpp.o [ 11%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/gbdt_model_text.cpp.o [ 11%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/gbdt_prediction.cpp.o [ 14%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/prediction_early_stop.cpp.o In file included from /usr/include/c++/8/bits/stl_algo.h:61, from /usr/include/c++/8/algorithm:62, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/prediction_early_stop.cpp:10: /usr/include/c++/8/bits/stl_heap.h: In function ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _Distance = int; _Tp = double; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<double> >]’: /usr/include/c++/8/bits/stl_heap.h:214:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1 __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, ^~~~~~~~~~~~~ [ 17%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/bin.cpp.o In file included from /usr/include/c++/8/vector:69, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/meta.h:14, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/config.h:15, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/boosting.h:8, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/boosting.cpp:5: /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’: /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1 vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_fill_insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = double; _Alloc = std::allocator<double>]’: /usr/include/c++/8/bits/vector.tcc:478:5: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1 vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/8/vector:64, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/meta.h:14, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/config.h:15, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/boosting.h:8, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/boosting.cpp:5: /usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual void LightGBM::RF::Boosting()’: /usr/include/c++/8/bits/stl_vector.h:847:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1 _M_fill_insert(end(), __new_size - size(), __x); ^~~~~~~~~~~~~~ /usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual void LightGBM::RF::ResetTrainingData(const LightGBM::Dataset*, const LightGBM::ObjectiveFunction*, const std::vector<const LightGBM::Metric*>&)’: /usr/include/c++/8/bits/stl_vector.h:847:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1 _M_fill_insert(end(), __new_size - size(), __x); ^~~~~~~~~~~~~~ In file included from /usr/include/c++/8/vector:69, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/meta.h:14, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/config.h:15, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/boosting.h:8, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/gbdt.h:8, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/gbdt.cpp:5: /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’: /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1 vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/8/vector:64, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/meta.h:14, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/config.h:15, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/include/LightGBM/boosting.h:8, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/gbdt.h:8, from /tmp/pip-install-vrgjju99/lightgbm_13710957d07b46f4a1b538e827f33d37/compile/src/boosting/gbdt.cpp:5: /usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual std::vector<double> LightGBM::GBDT::GetEvalAt(int) const’: /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1 _M_realloc_insert(end(), __x); ^~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1 _M_realloc_insert(end(), __x); ^~~~~~~~~~~~~~~~~ 何か打ち手はありますでしょうか?
hi_chan

2021/08/29 05:56 編集

この確認であっているか不安ですが、以下のようになっております。 ps-ax で実行しました。 PID TTY STAT TIME COMMAND 1 ? Ss 0:05 /sbin/init splash 2 ? S 0:00 [kthreadd] 3 ? I< 0:00 [rcu_gp] 4 ? I< 0:00 [rcu_par_gp] 8 ? I< 0:00 [mm_percpu_wq] 9 ? S 0:00 [ksoftirqd/0] 10 ? I 0:01 [rcu_sched] 11 ? S 0:00 [migration/0] 12 ? S 0:00 [cpuhp/0] 13 ? S 0:00 [cpuhp/1] 14 ? S 0:00 [migration/1] 15 ? S 0:00 [ksoftirqd/1] 18 ? S 0:00 [cpuhp/2] 19 ? S 0:00 [migration/2] 20 ? S 0:00 [ksoftirqd/2] 23 ? S 0:00 [cpuhp/3] 24 ? S 0:00 [migration/3] 25 ? S 0:00 [ksoftirqd/3] 28 ? S 0:00 [kdevtmpfs] 29 ? I< 0:00 [netns] 32 ? S 0:00 [khungtaskd] 33 ? S 0:00 [oom_reaper] 34 ? I< 0:00 [writeback] 35 ? S 0:00 [kcompactd0] 61 ? I< 0:00 [kblockd] 62 ? S 0:00 [watchdogd] 65 ? I< 0:00 [rpciod] 66 ? I< 0:00 [kworker/u9:0-hci0] 67 ? I< 0:00 [xprtiod] 68 ? S 0:01 [kswapd0] 69 ? I< 0:00 [nfsiod] 70 ? I< 0:00 [iscsi_eh] 71 ? I< 0:00 [dwc_otg] 72 ? I< 0:00 [DWC Notificatio] 74 ? S< 0:00 [vchiq-slot/0] 75 ? S< 0:00 [vchiq-recy/0] 76 ? S< 0:00 [vchiq-sync/0] 77 ? S 0:00 [vchiq-keep/0] 78 ? S< 0:00 [SMIO] 80 ? I< 0:00 [mmc_complete] 81 ? I< 0:00 [kworker/2:1H-kblockd] 83 ? I< 0:00 [kworker/1:1H-kblockd] 85 ? S 0:00 [jbd2/mmcblk0p2-] 86 ? I< 0:00 [ext4-rsv-conver] 87 ? I< 0:00 [kworker/3:1H-kblockd] 88 ? I< 0:00 [kworker/0:2H-mmc_complete] 91 ? I< 0:00 [ipv6_addrconf] 95 ? S 0:00 [irq/166-usb-001] 121 ? Ss 0:00 /lib/systemd/systemd-journald 152 ? Ss 0:01 /lib/systemd/systemd-udevd 166 ? S< 0:00 [SMIO] 174 ? S 0:00 [spi0] 183 ? I< 0:00 [mmal-vchiq] 184 ? I< 0:00 [mmal-vchiq] 185 ? I< 0:00 [mmal-vchiq] 186 ? I< 0:00 [mmal-vchiq] 214 ? I< 0:00 [cfg80211] 222 ? I< 0:00 [brcmf_wq/mmc1:0] 223 ? S 0:00 [brcmf_wdog/mmc1] 225 ? I 0:00 [kworker/3:4-events] 319 ? Ssl 0:00 /lib/systemd/systemd-timesyncd 324 ? Ssl 0:00 /usr/lib/udisks2/udisksd 326 ? Ssl 0:00 /usr/sbin/rsyslogd -n -iNONE 327 ? SNs 0:00 /usr/sbin/alsactl -E HOME=/run/alsa -s -n 19 -c rdaem 334 ? Ss 0:00 /lib/systemd/systemd-logind 335 ? Ss 0:00 /usr/bin/dbus-daemon --system --address=systemd: --no 339 ? Ss 0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant 343 ? Ss 0:00 /usr/sbin/cron -f 351 ? Ss 0:03 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d 359 ? Ss 0:00 avahi-daemon: running [togikai03.local] 360 ? SLsl 1:55 /usr/bin/pigpiod -l 379 ? SLsl 0:01 /usr/sbin/rngd -r /dev/hwrng 410 ? S 0:00 avahi-daemon: chroot helper 412 ? Ss 0:00 /sbin/dhcpcd -q -b 434 ? Ss 0:00 /usr/bin/vncserver-x11-serviced -fg 442 ? Ss 0:00 /usr/sbin/vsftpd /etc/vsftpd.conf 445 ? S 0:00 /usr/bin/vncserver-x11-core -service 446 ? Ssl 0:00 /usr/lib/policykit-1/polkitd --no-debug 454 ? Ssl 0:00 /usr/sbin/lightdm 455 ? S 0:00 /usr/sbin/xrdp-sesman 467 ? Ss 0:00 /usr/sbin/sshd -D 470 ? S 0:00 /usr/sbin/xrdp 484 tty7 Ssl+ 2:06 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/ligh 485 tty1 Ss 0:00 /bin/login -f 491 ? S 0:00 /usr/bin/vncagent service 14 495 ? Ss 0:00 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplican 526 ? Sl 0:00 lightdm --session-child 14 17 534 ? Ss 0:00 /lib/systemd/systemd --user 537 ? S 0:00 (sd-pam) 549 ? Ssl 0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE 558 ? Ss 0:00 /usr/bin/dbus-daemon --session --address=systemd: --n 602 ? Ss 0:00 /usr/bin/ssh-agent /usr/bin/im-launch x-session-manag 619 ? Ssl 0:20 /usr/bin/ibus-daemon --daemonize --xim 627 ? Ssl 0:00 /usr/lib/gvfs/gvfsd 634 ? Sl 0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o bi 648 ? Sl 0:00 /usr/lib/ibus/ibus-dconf 649 ? Sl 0:10 /usr/lib/ibus/ibus-ui-gtk3 650 ? Sl 0:11 /usr/lib/ibus/ibus-extension-gtk3 653 ? Sl 0:01 /usr/lib/ibus/ibus-x11 --kill-daemon 656 ? Sl 0:00 /usr/lib/ibus/ibus-portal 664 ? S 0:02 openbox --config-file /home/pi/.config/openbox/lxde-p 667 ? Sl 0:00 lxpolkit 669 ? Sl 0:06 lxpanel --profile LXDE-pi 671 ? Sl 0:05 pcmanfm --desktop --profile LXDE-pi 677 ? Ss 0:00 /usr/bin/ssh-agent -s 699 ? S 0:01 /usr/bin/vncserverui service 15 707 ? S 0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow 708 ? I< 0:00 [kworker/u9:2-hci0] 720 ? Ss 0:00 /usr/lib/bluetooth/bluetoothd 729 tty1 S+ 0:00 -bash 730 ? Ssl 0:00 /usr/bin/bluealsa 743 ? S< 0:00 [krfcommd] 750 ? S 0:00 /usr/bin/vncserverui -statusicon 5 767 ? Ssl 0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor 791 ? Sl 0:00 /usr/lib/menu-cache/menu-cached /run/user/1000/menu-c 823 ? Ssl 0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor 849 ? Ssl 0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor 864 ? Ssl 0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor 868 ? Ssl 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor 874 ? Sl 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.4 /org/gtk/gvf 880 ? Sl 0:06 /usr/lib/ibus-mozc/ibus-engine-mozc --ibus 898 ? SLl 0:02 /usr/lib/mozc/mozc_server 1031 ? Ssl 0:00 /usr/lib/gvfs/gvfsd-metadata 1047 ? Sl 0:00 /usr/lib/dconf/dconf-service 1054 ? Sl 0:00 /usr/lib/ibus/ibus-engine-simple 1103 ? Sl 2:00 /usr/lib/chromium-browser/chromium-browser-v7 --disab 1124 ? S 0:00 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1126 ? S 0:00 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1148 ? Sl 1:57 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1152 ? Sl 0:10 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1297 ? Sl 0:10 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1357 ? Sl 2:24 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1460 ? Sl 0:04 /usr/lib/mozc/mozc_renderer 1512 ? I 0:01 [kworker/u8:0-events_unbound] 1541 ? I 0:00 [kworker/1:0-mm_percpu_wq] 1552 ? I 0:00 [kworker/0:2-events] 1581 ? I 0:00 [kworker/3:1-events] 1621 ? Sl 0:07 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1643 ? Sl 18:33 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1665 ? I 0:00 [kworker/2:2-events] 1762 ? Sl 0:51 /usr/bin/python3 /usr/bin/thonny /home/pi/LightGBM/py 1780 ? Sl 0:20 mousepad /home/pi/LightGBM/python-package/README.rst 1807 ? I 0:00 [kworker/0:1-events] 1825 ? I 0:00 [kworker/u8:1-events_unbound] 1899 ? I< 0:00 [kworker/1:0H] 1900 ? Sl 0:03 /usr/lib/chromium-browser/chromium-browser-v7 --type= 1949 ? S 0:00 /usr/bin/python3 -u -B /usr/lib/python3/dist-packages 1954 ? I 0:00 [kworker/2:1-mm_percpu_wq] 1966 ? I< 0:00 [kworker/3:0H] 1970 ? Sl 0:02 lxterminal 1976 pts/0 Ss 0:00 bash 1994 ? I< 0:00 [kworker/2:0H] 2003 ? I< 0:00 [kworker/0:1H] 2004 ? I 0:00 [kworker/1:2-mm_percpu_wq] 2059 ? I 0:00 [kworker/u8:2-events_unbound] 2075 ? I 0:00 [kworker/2:0-events] 2109 ? I 0:00 [kworker/0:0-events] 2111 ? I< 0:00 [kworker/1:2H] 2112 ? Sl 0:10 /usr/lib/chromium-browser/chromium-browser-v7 --type= 2122 ? I< 0:00 [kworker/0:0H] 2124 ? Sl 0:01 /usr/lib/chromium-browser/chromium-browser-v7 --type= 2135 ? Sl 0:01 /usr/lib/chromium-browser/chromium-browser-v7 --type= 2162 ? I 0:00 [kworker/1:1-events] 2173 ? I< 0:00 [kworker/3:2H] 2177 pts/0 R+ 0:00 ps -ax
jbpb0

2021/08/29 09:21 編集

psコマンドならauxを指定して、%CPUや%MEMが他プロセスよりもかなり大きいものがないか、確認してください 参考 https://www.limemo.net/blog/2016/02/%E3%83%A9%E3%82%BA%E3%83%99%E3%83%AA%E3%83%BC%E3%83%91%E3%82%A42%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B-%E5%87%A6%E7%90%86%E4%B8%AD%E3%81%AE%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9.html なお、 pip3 insall… を実行して、プロンプトが表示されない(フリーズしてるように見える)状態のまま、他のターミナルでpsコマンドやtopコマンドを実行して確認してください pip3コマンドを終了した後だと、psやtopを実行しても意味がないです 【追記】 上記は、 > 実行後フリーズしてしまいます。 が、pip3コマンドが終了しないという意味だとして書いてますが、それで合ってますか?
hi_chan

2021/08/29 09:39

ありがとうございます。 >%CPUや%MEMが他プロセスよりもかなり大きいものがないか、確認してください →確認したところ、1番大きそうなのが下記になります。 pi 4498 14.2 11.5 374884 109460 ? Sl 18:30 0:30 /usr/lib/chromium-browser/chromium-b こちらはブラウザという認識でよろしいでしょうか? >実行後フリーズしてしまいます。 が、pip3コマンドが終了しないという意味だとして書いてますが、それで合ってますか? →はい、合っています。  実際、フリーズしてしまうと、マウスも動かなくなってしまうので、他ターミナルを立ち上げる事もできなくなってしまいます。 念の為、もう1度やってみます。
jbpb0

2021/08/29 10:02 編集

> こちらはブラウザという認識でよろしいでしょうか? はい なるべくメモリーを余らせておくために、ブラウザ等は起動させないでおいてください ちなみに、ラズパイでOpenCVをソースからコンパイルする場合は、スワップサイズを1〜2GBくらいまで広げる必要があり、コンパイル終了まで数時間かかるのだそうです https://www.miki-ie.com/raspberry-pi/raspberry-pi-3-b-opencv-4-1-1-cv2/ https://signal-flag-z.blogspot.com/2019/03/opencv-4-raspberry-pi.html lightGBMの規模がOpenCVと比べてどの程度か知りませんが、もしかしたらコンパイルにそこそこ時間がかかるかもしれませんし、OpenCVと同様にスワップサイズを広げないとコンパイルできないのかもしれません > フリーズしてしまうと、マウスも動かなくなってしまう のでしたら、スワップが足りなくなってる可能性がありますね
hi_chan

2021/08/29 10:15

ブラウザなどを全て落としてから実行しました。 別ターミナルを立ち上げて、topを起動させてみると、 COMMAND:cc1plus でCPU100%近く使用されています。 メモリは68.5%ほどでした。 ログを確認したところ、 -- Build files have been written to: /tmp/pip-install-2uiy1c1o/lightgbm_00a1abfd32ce43f4a8c587291170e5b6/build_cpp の項目で85%まで進んでいました。 ただ、エラー表記されているわけではなかったので、 フリーズしているようで実は裏で進んでいたのか?と疑念がわきますが、いかがでしょうか? もしくは、スワップが足りない為、ここでフリーズしてしまっているのでしょうか? この場合、スワップ領域を拡大するという対処法をとるのが良さそうですが、 適切なスワップファイル容量はどの程度でしょうか?(現状は100MB)
jbpb0

2021/08/29 10:34

> フリーズしているようで実は裏で進んでいた 別ターミナルのtopコマンドの画面更新がずっと続いてるのなら、そうです topコマンドの更新も止まるなら、おそらくOSが固まってます > 適切なスワップファイル容量はどの程度でしょうか? 分かりません SDカードの容量に余裕があるのなら、大きめにしといたらいいのではないですかね lightGBMのビルドをしてる時だけの話なので
hi_chan

2021/08/29 11:17

jbpb0さん スワップファイル容量を2048MBに拡張して実行したところ、無事にインストールできました。 何から何まで色々教えて頂き、ありがとうございました。 感謝です!!
guest

回答1

0

自己解決

###①コマンド入力方法変更

pip3 install lightgbm --install-option=--bit32

実行中にフリーズ

###②スワップ領域拡大
現状確認

free -m

⇢100MB

2048MBに、領域拡大

sudo nano /etc/dphys-swapfile

下記のように編集し、保存

CONF_SWAPSIZE=2048

dphys-swapfileを再起動

sudo systemctl stop dphys-swapfile sudo systemctl start dphys-swapfile

###③再実行
これで無事インストールできました。

投稿2021/08/29 11:43

hi_chan

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問