栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

python使用pip安装lightgbm报错解决

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

python使用pip安装lightgbm报错解决

pip安装默认版本是最新的版本太高了,需要降低版本:pip install "lightgbm==2.3.1"

ubuntu下报错信息:

Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting lightgbm
  Downloading http://mirrors.aliyun.com/pypi/packages/7a/6d/db0f5effd3f7982632111f37fcd2fa386b8407f1ff58ef30b71d65e1a444/lightgbm-3.2.1.tar.gz (1.5MB)
     |████████████████████████████████| 1.5MB 232kB/s 

ERROR: Command errored out with exit status 1:
     command: /home/yinchen/anaconda3/envs/python27new/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wNQXHB/lightgbm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wNQXHB/lightgbm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-wNQXHB/lightgbm/pip-egg-info
         cwd: /tmp/pip-install-wNQXHB/lightgbm/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "", line 1, in
      File "/tmp/pip-install-wNQXHB/lightgbm/setup.py", line 43
        logger.info(f"Installing lib_lightgbm from: {LIB_PATH}")
                                                              ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
 

window下报错信息:

    ERROR: Command errored out with exit status 1:
     command: 'c:users72666appdatalocalcontinuumanaconda3envspython27newpython.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\72666\appdata\local\temp\pip-install-ohrfhv\lightgbm\setup.py'"'"'; __file__='"'"'c:\users\72666\appdata\local\temp\pip-install-ohrfhv\lightgbm\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'c:users72666appdatalocaltemppip-pip-egg-info-oilnu4'
         cwd: c:users72666appdatalocaltemppip-install-ohrfhvlightgbm
    Complete output (6 lines):
    Traceback (most recent call last):
      File "", line 1, in
      File "c:users72666appdatalocaltemppip-install-ohrfhvlightgbmsetup.py", line 38
        def find_lib() -> List[str]:
                       ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

感谢:lightgbm 安装报错解决_wangwangstone的博客-CSDN博客

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/303748.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号