• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

linux下,pip安装lap出现问题,conda安装不在源内,已解决,有效

武飞扬头像
Yoyager
帮助1

用pip安装出现报错,并且这个包网上查了很多都没办法解决,于是来记录一下我的解决方法。

  1.  
    note: This error originates from a subprocess, and is likely not a problem with pip.
  2.  
    ERROR: Failed building wheel for lap
  3.  
    Running setup.py clean for lap
  4.  
    Failed to build lap
  5.  
    Installing collected packages: lap
  6.  
    Running setup.py install for lap ... error
  7.  
    error: subprocess-exited-with-error
  8.  
     
  9.  
    × Running setup.py install for lap did not run successfully.
  10.  
    exit code: 1
  11.  
    ╰─> [34 lines of output]
  12.  
    Partial import of lap during the build process.
  13.  
    Generating cython files
  14.  
    running install
  15.  
    running build
  16.  
    running config_cc
  17.  
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  18.  
    running config_fc
  19.  
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  20.  
    running build_src
  21.  
    build_src
  22.  
    building extension "lap._lapjv" sources
  23.  
    building data_files sources
  24.  
    build_src: building npy-pkg config files
  25.  
    running build_py
  26.  
    creating build
  27.  
    creating build/lib.linux-x86_64-3.7
  28.  
    creating build/lib.linux-x86_64-3.7/lap
  29.  
    copying lap/__init__.py -> build/lib.linux-x86_64-3.7/lap
  30.  
    copying lap/lapmod.py -> build/lib.linux-x86_64-3.7/lap
  31.  
    running build_ext
  32.  
    customize UnixCCompiler
  33.  
    customize UnixCCompiler using build_ext
  34.  
    customize UnixCCompiler
  35.  
    customize UnixCCompiler using build_ext
  36.  
    building 'lap._lapjv' extension
  37.  
    compiling C sources
  38.  
    C compiler: g -pthread -B /root/anaconda3/envs/paddle/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
  39.  
     
  40.  
    creating build/temp.linux-x86_64-3.7/lap
  41.  
    compile options: '-I/root/anaconda3/envs/paddle/lib/python3.7/site-packages/numpy/core/include -Ilap -I/root/anaconda3/envs/paddle/lib/python3.7/site-packages/numpy/core/include -I/root/anaconda3/envs/paddle/include/python3.7m -c'
  42.  
    g : lap/_lapjv.cppg : lap/lapjv.cppg : lap/lapmod.cpp
  43.  
     
  44.  
     
  45.  
    error: Command "g -pthread -B /root/anaconda3/envs/paddle/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/root/anaconda3/envs/paddle/lib/python3.7/site-packages/numpy/core/include -Ilap -I/root/anaconda3/envs/paddle/lib/python3.7/site-packages/numpy/core/include -I/root/anaconda3/envs/paddle/include/python3.7m -c lap/lapjv.cpp -o build/temp.linux-x86_64-3.7/lap/lapjv.o -MMD -MF build/temp.linux-x86_64-3.7/lap/lapjv.o.d" failed with exit status 127
  46.  
    [end of output]
  47.  
     
  48.  
    note: This error originates from a subprocess, and is likely not a problem with pip.
  49.  
    error: legacy-install-failure
  50.  
     
  51.  
    × Encountered error while trying to install package.
  52.  
    ╰─> lap
  53.  
     
  54.  
    note: This is an issue with the package mentioned above, not pip.
  55.  
    hint: See above for output from the failure.
学新通

conda安装出现不在源内,报错

  1.  
    C:\Users\Dell>conda install lap
  2.  
    Collecting package metadata (current_repodata.json): done
  3.  
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
  4.  
    Collecting package metadata (repodata.json): done
  5.  
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
  6.  
     
  7.  
    PackagesNotFoundError: The following packages are not available from current channels:
  8.  
     
  9.  
    - lap
  10.  
     
  11.  
    Current channels:
  12.  
     
  13.  
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
  14.  
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
  15.  
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
  16.  
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
  17.  
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
  18.  
    - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
  19.  
     
  20.  
    To search for alternate channels that may provide the conda package you're
  21.  
    looking for, navigate to
  22.  
     
  23.  
    https://anaconda.org
  24.  
     
  25.  
    and use the search bar at the top of the page.
学新通

解决方法一:

用conda安装,用以下命令:

conda install -c conda-forge lap

解决方法二:

用pip安装,用以下命令:

pip install git git://github.com/gatagat/lap.git

这个我没试过,因为第一种就成功了。

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgfieea
系列文章
更多 icon
同类精品
更多 icon
继续加载