-
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
[python-package] Build from Sources failed #5906
Comments
Thanks for using LightGBM. To start, I re-formatted the text of your issue a bit, to more clearly separate logs and code from your own statements. Please see https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax for some advice on how to format text on GitHub. I have some questions.
You said you ran
rm -f ./build
mkdir build
cd build
cmake ..
make -j2 |
Thanks James for your response :) I was trying to build the lightgbm python package from the source code which I cloned from GitHub.
I tried to lightgbm windows build to verify if my cmake & visual studio 2022 have any issues.
seems cmake succeeded but make failed :(
or
|
You missed running
Ok, please try running the following from the root of the repository. sh build-python.sh install Don't run |
Thank you James!
without problem.
to
and run
with output log:
everything looks successful but when I tested it with simple python example:
I still get old message instead of the new one I updated:
May I ask if I missed anything in my build? |
found the root cause: Once installed, running build-python.sh script again won't install new light gbm version.
to remove original install the run build-python.sh again Suggestion: maybe add
in the beginning of build-python.sh
to
as another section:
to help future beginners like me |
That isn't true (or at least, I'm not able to reproduce that). Can you please try making that logging change in the relevant file in |
That logging change was made in the relevant file (under |
I don't think we should. The second sentence of that page already says "If you want to build the Python-packagge or R-package please refer to Python-package".
I am not able to reproduce that behavior, and don't think it's an issue with the build script in this project. But I'm glad running However, I noticed you're using |
Ah no wait, I see it now! Running
Hadn't noticed that before. I thought that by "remove original install" you meant "remove an older version installed with I'll push a fix for that, thanks for catching it. |
Thank you!!! |
oh I did not realize that the |
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. |
Description
Trying to build from sources under python-package but got following error message:
On my computer, I have Visual Studio 2022 & cmake 3.26.4 installed,
also I have made sure cmake is in system PATH that I was able to following instructions on windows build (not python-package) without problem.
Reproducible example
Environment info
LightGBM version or commit hash:
The latest one I got by using:
Command(s) you used to install LightGBM
I checked the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
originally there is no VCTargetsPath there and I manually added VCTargetsPath with value
$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\v140\
but still got the same error message :(
Additional Comments
The text was updated successfully, but these errors were encountered: