Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install error on windows #2

Open
cankeyyin opened this issue Feb 20, 2022 · 3 comments
Open

install error on windows #2

cankeyyin opened this issue Feb 20, 2022 · 3 comments

Comments

@cankeyyin
Copy link

I installed Visual Studio 16 2019 on my PC and run setup.py, but I still got the following error:

D:\mtgbmcode-main\python-package>python setup.py install
running install
C:\Users\Administrator\miniconda3\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
INFO:LightGBM:Starting to compile the library.
INFO:LightGBM:Starting to compile with MSBuild from existing solution file.
WARNING:LightGBM:Compilation with MSBuild from existing solution file failed.
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 "D:\mtgbmcode-main\python-package\setup.py", line 310, in
setup(name='lightgbmmt',
File "C:\Users\Administrator\miniconda3\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Administrator\miniconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Administrator\miniconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Administrator\miniconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\mtgbmcode-main\python-package\setup.py", line 267, in run
compile_cpp(use_mingw=self.mingw, use_gpu=self.gpu, use_mpi=self.mpi,
File "D:\mtgbmcode-main\python-package\setup.py", line 163, in compile_cpp
raise Exception("\n".join(('Please install Visual Studio or MS Build and all required dependencies first',
Exception: Please install Visual Studio or MS Build and all required dependencies first
The full version of error log was saved into C:\Users\Administrator\LightGBM_compilation.log

@cankeyyin
Copy link
Author

LightGBM_compilation.log is a empty file

@mtgbmcode
Copy link
Contributor

You need to have the environment to compile the cpp.

@ooyuanyuan
Copy link

LightGBM_compilation.log is a empty file

maybe you can find that "FileNotFoundError: [Errno 2] No such file or directory: 'cmake'" in the error log, because it has not installed cmake in your env, you can run:
yum install -y cmake
install cmake and then run python setup.py...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants