-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Visual Studio instance not found when building python package gpu version when using VS2022 and how I solved it #4906
Comments
@124san Thanks for reporting this issue! Support for Visual Studio 2022 was added a few days ago (#4889) and next release of LightGBM will respect it correctly. For now you can install nightly builds: https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#nightly-builds. Just a note: I'm glad that GPU version finely worked with Boost 1.78 and CUDA 11.5 (we are not testing this combination of dependencies on our CI)! |
One other note... @124san in the future, if possible, please post error messages and logs as text instead of screenshots. That makes it possible for others facing similar issues to find these discussions from search engines. |
I didn't think about search engine, thank you for letting me know! I'll
post text next time.
…On Fri, Dec 24, 2021 at 3:20 AM James Lamb ***@***.***> wrote:
One other note... @124san <https://github.com/124san> in the future, if
possible, please post error messages and logs as text instead of
screenshots. That makes it possible for others facing similar issues to
find these discussions from search engines.
—
Reply to this email directly, view it on GitHub
<#4906 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGVNTLHV2TCC6BRQDGSZNFTUSNY6RANCNFSM5KUIWZFA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm glad that it works with newest Boost and CUDA! Also, thanks for letting me know about the support for VS2022. |
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
I tried to install python package gpu version after downloading and installing all the prerequisites, including Visual Studio, Boost and OpenCL. However, it resulted in "Exception Please install Visual Studio or MS Build and all required dependencies first" (screenshot doesnt have any install option because it was for reproducing the error, which the same with install options included):
Checking the logs gives me something like this:
The first thing I did after the error is to install 2019 build tools within Visual Studio 2022. However, it still gave me the same error after installing. I had no luck with 2017 build tools either.
After a decent amount of googling, I found this post on stackoverflow. The accepted answer suggested installing the entire "Visual Studio Build Tools 2017" which include MSBuild. After downloading and installing 2019 build tools, the build command for gpu version finally succeeded. Here is the command I used, with 1.78.0 boost:
pip install lightgbm --install-option=--gpu --install-option="--opencl-include-dir=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5/include" --install-option="--opencl-library=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5/lib/x64/OpenCL.lib" --install-option="--boost-root=C:/local/boost_1_78_0" --install-option="--boost-librarydir=C:/local/boost_1_78_0/lib64-msvc-14.2"
.TLDR: Python LightGBM gpu version build process does not pick up Visual Studio 2022 version, even if it has older version of build tools inside. You have to install older Visual Studio or Build Tools seperately.
The text was updated successfully, but these errors were encountered: