Skip to content

LightGBM import error #499

Closed
Closed
@llmercury

Description

Environment info

Operating System: Windows 10 Home, 64 bit
CPU: Intel i7-7700
GPU: GeForce GTX 1070
C++/Python version: Microsoft Visual Studio Community 2017/ Python 3.5.2 /Anaconda 4.3.1 (64-bit)

My laptop has 2 hard drives, C: and D:.

I followed the installation instruction at: https://github.com/Microsoft/LightGBM/wiki/Installation-Guide#windows-2

This has GPU support. For D:\local\boost_1_64_0\ and D:\local\boost_1_64_0\lib64-msvc-14.0, the location of the Boost binaries, I set them to the system environment variables BOOST_ROOT and BOOST_LIBRARYDIR. No errors during installation. After installation, I checked it by "conda list lightgbm", it shows lightgbm 0.1. It appeared fine.

However, when I imported the lightgbm in Jupyter Notebook, I got Error messages:

Error Message:


OSError Traceback (most recent call last)
in ()
----> 1 import lightgbm as lgb

D:\Program_Files\Anaconda3\envs\py35\lib\site-packages\lightgbm-0.1-py3.5.egg\lightgbm_init_.py in ()
7 from future import absolute_import
8
----> 9 from .basic import Booster, Dataset
10 from .callback import (early_stopping, print_evaluation, record_evaluation,
11 reset_parameter)

D:\Program_Files\Anaconda3\envs\py35\lib\site-packages\lightgbm-0.1-py3.5.egg\lightgbm\basic.py in ()
29
30
---> 31 _LIB = _load_lib()
32
33

D:\Program_Files\Anaconda3\envs\py35\lib\site-packages\lightgbm-0.1-py3.5.egg\lightgbm\basic.py in _load_lib()
24 if len(lib_path) == 0:
25 return None
---> 26 lib = ctypes.cdll.LoadLibrary(lib_path[0])
27 lib.LGBM_GetLastError.restype = ctypes.c_char_p
28 return lib

D:\Program_Files\Anaconda3\envs\py35\lib\ctypes_init_.py in LoadLibrary(self, name)
423
424 def LoadLibrary(self, name):
--> 425 return self._dlltype(name)
426
427 cdll = LibraryLoader(CDLL)

D:\Program_Files\Anaconda3\envs\py35\lib\ctypes_init_.py in init(self, name, mode, handle, use_errno, use_last_error)
345
346 if handle is None:
--> 347 self._handle = _dlopen(self._name, mode)
348 else:
349 self._handle = handle

OSError: [WinError 126] The specified module could not be found

Please help!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions