Я пытался следовать указаниям по созданию пакета python на основе https://github.com/microsoft/LightGBM/tree/master/python-package.
Я уже установил vs2019, cmake 3.17.2 и boost 1.73.0- мЗв c -14.2-64.exe.
Python версия 3.6.8
pip install lightgbm --install-option=--gpu --install-option="--boost-dir=d:/boost_1_73_0" --install-option="--boost-librarydir=d:/boost_1_73_0/lib64-msvc-14.2"
Выдает следующую ошибку
ERROR: Command errored out with exit status 1:
command: 'd:\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-wy_duymo\\lightgbm\\setup.py'"'"'; __file__='"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-wy_duymo\\lightgbm\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\chest\AppData\Local\Temp\pip-record-oyinzk76\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python36\Include\lightgbm' --gpu --boost-dir=d:/boost_1_73_0 -boost-librarydir=d:/boost_1_73_0/lib64-msvc-14.2
cwd: C:\Users\chest\AppData\Local\Temp\pip-install-wy_duymo\lightgbm\
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option -b not recognized
После исправления «--boost-librarydir», произошла новая ошибка:
ERROR: Command errored out with exit status 1:
command: 'd:\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-rsk81qed\\lightgbm\\setup.py'"'"'; __file__='"'"'C:\\Users\\chest\\AppData\\Local\\Temp\\pip-install-rsk81qed\\lightgbm\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\chest\AppData\Local\Temp\pip-record-8v2a16nb\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python36\Include\lightgbm' --gpu --boost-dir=d:/boost_1_73_0 --boost-librarydir=d:/boost_1_73_0/lib64-msvc-14.2
cwd: C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\
Complete output (23 lines):
running install
INFO:LightGBM:Starting to compile the library.
INFO:LightGBM:Starting to compile with Visual Studio 16 2019.
INFO:LightGBM:Starting to compile with Visual Studio 15 2017.
INFO:LightGBM:Starting to compile with Visual Studio 14 2015.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\setup.py", line 345, in <module>
'Topic :: Scientific/Engineering :: Artificial Intelligence'])
File "d:\python36\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "d:\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "d:\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "d:\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\setup.py", line 272, in run
nomp=self.nomp, bit32=self.bit32)
File "C:\Users\chest\AppData\Local\Temp\pip-install-rsk81qed\lightgbm\setup.py", line 164, in compile_cpp
LOG_NOTICE)))
Exception: Please install Visual Studio or MS Build and all required dependencies first
The full version of error log was saved into C:\Users\chest\LightGBM_compilation.log