LightGBM Installation Does Not Work

Asked 2 years ago, Updated 2 years ago, 110 views

I'm a beginner at Kaggle
This is my first time using stackoverflow, so I think there are many things that I can't do, but please forgive me.
Installation of LightGBM does not work...
I installed it according to the official procedure.

Enter a description of the image here

In import lightgbm as lgb, the error ImportError: cannot import name 'zip_' appears.

Please let me know if anyone knows.Thank you.
Tried Apple Clang and gcc.

Add

  • mac OS High Sierra version 10.13.6
  • Python 3.6.3::Anaconda, Inc.

I also tried installing on anaconda from https://anaconda.org/conda-forge/lightgbm, but

Enter a description of the image here

During installation, an error similar to the one in the picture above occurs.

As you pointed out in the comment, I compared the contents of compat.py to the local ~/.pyenv/versions/anaconda3-5.0.1/lib/python 3.6/site-packages/lightgbm/compat.py and it was the same.

Enter a description of the image here

python kaggle

2022-09-30 21:33

1 Answers

import lightgbm as lgb displays the error ImportError: cannot import name 'zip_', but the code for LightGBM does not usually cause such an error.

I have compiled and installed LightGBM, but there are no problems with GitHub's issu, except for the Clang and gcc versions.

Also, pyenv+anaconda may be convenient, but due to its specifications, it is easy to cause problems when using pip in anaconda or using the latest version of conda.

Considering this, I think it would be faster to start the installation again.

Also, LightGBM has a binary version published on PyPI, so if you want to use the official Python, please use the following

 pip3 install numpy scipy scikit-learn lightgbm

If it's Anaconda,

conda install-conda-forge lightgbm

can be installed in minutes.


2022-09-30 21:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.