pip install lap时报错,可以尝试指定特定版本的包

pip install lap时报错:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting lap
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/bf/64/d9fb6a75b15e783952b2fec6970f033462e67db32dc43dfbb404c14e91c2/lap-0.4.0.tar.gz (1.5 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: lap
  Building wheel for lap (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      /tmp/pip-install-7zl2qyty/lap_41e8804da0774145badb87ffc4023c16/setup.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        from pkg_resources import parse_version
      Partial import of lap during the build process.
      /tmp/pip-install-7zl2qyty/lap_41e8804da0774145badb87ffc4023c16/setup.py:223: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html


        from numpy.distutils.core import setup
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-7zl2qyty/lap_41e8804da0774145badb87ffc4023c16/setup.py", line 236, in <module>
          setup_package()
        File "/tmp/pip-install-7zl2qyty/lap_41e8804da0774145badb87ffc4023c16/setup.py", line 223, in setup_package
          from numpy.distutils.core import setup
        File "/home/firefly/miniconda3/envs/rk/lib/python3.9/site-packages/numpy/distutils/core.py", line 24, in <module>
          from numpy.distutils.command import config, config_compiler, \
        File "/home/firefly/miniconda3/envs/rk/lib/python3.9/site-packages/numpy/distutils/command/config.py", line 19, in <module>
          from numpy.distutils.mingw32ccompiler import generate_manifest
        File "/home/firefly/miniconda3/envs/rk/lib/python3.9/site-packages/numpy/distutils/mingw32ccompiler.py", line 27, in <module>
          from distutils.msvccompiler import get_build_version as get_build_msvc_version
      ModuleNotFoundError: No module named 'distutils.msvccompiler'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lap
  Running setup.py clean for lap
Failed to build lap
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lap)

可以尝试指定特定版本的包:

~/miniconda3/envs/rk/bin/pip install setuptools==59.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/
~/miniconda3/envs/rk/bin/pip install numpy==1.26.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/
~/miniconda3/envs/rk/bin/pip install lap -i https://pypi.tuna.tsinghua.edu.cn/simple/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

滴答滴答滴嗒滴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值