我正在尝试安装Python的LightGBM图形处理器版本。我是从Git安装的,并且已经成功构建了LightGBM,测试结果与预期一致。
[LightGBM] [Info] Iteration:100, training auc : 0.997687
[LightGBM] [Info] Iteration:100, valid_1 binary_logloss : 0.519711
[LightGBM] [Info] Iteration:100, valid_1 auc : 0.81798
[LightGBM] [Info] 14.887669 seconds elapsed, finished iteration 100
[LightGBM] [Info] Finished training然而,当我试图
import LightGBM as gbmPython已返回
FileNotFoundError: Could not find module 'C:\Users\N\AppData\Local\Programs\Python\Python38\lib\site-packages\lightgbm\lib_lightgbm.dll'. Try using the full path with constructor syntax.我尝试过运行setup.py install --precompile,但没有任何帮助。我是不是在这个过程中错过了什么?
发布于 2020-05-22 12:15:28
从Python3.8开始,.dll搜索方法发生了变化。供参考的docs。尝试os.chdir('path_to_working_dlls_directoy'),或者如果不起作用,请尝试os.add_dll_directory("path_to_working_dlls_directoy")
https://stackoverflow.com/questions/61947435
复制相似问题