报错提示:
ERROR: Command errored out with exit status 1:
command: /bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-B6tTOW/lightgbm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-B6tTOW/lightgbm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /tmp/pip-install-B6tTOW/lightgbm/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-B6tTOW/lightgbm/setup.py", line 43
logger.info(f"Installing lib_lightgbm from: {LIB_PATH}")
&nb

在Python2.7的环境中尝试通过pip安装lightGBM时遇到错误。首先,尝试安装最新版本(3.2.1)失败,原因是语法不兼容。然后,指定安装旧版本(2.3.1)时,又遇到了权限问题,无法写入到系统目录。最终,通过添加`--user`参数以用户模式安装,成功解决了问题。
最低0.47元/天 解锁文章
8382

被折叠的 条评论
为什么被折叠?



