NOOB-面具 2022-10-11 19:23 采纳率: 50%
浏览 330
已结题

Python安装库失败

最近安装库,很多库出现类似的安装失败,请问怎么解决?

C:\Users\Administrator>pip install pyautogui
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyautogui
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f0/76/7a0ec1013bc3559b7438f6773cba05ffaec600b8989be2d621a144e39b50/PyAutoGUI-0.9.53.tar.gz (59 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Administrator\AppData\Local\Temp\pip-install-_qs5fjbj\pyautogui_0cddc1057a884c0da93050a5db4e1124\setup.py", line 18, in <module>
          setup(
        File "D:\Python310\lib\site-packages\setuptools\__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "D:\Python310\lib\site-packages\setuptools\__init__.py", line 75, in _install_setup_requires
          dist = MinimalDistribution(attrs)
        File "D:\Python310\lib\site-packages\setuptools\__init__.py", line 57, in __init__
          super().__init__(filtered)
        File "D:\Python310\lib\site-packages\setuptools\dist.py", line 475, in __init__
          for ep in metadata.entry_points(group='distutils.setup_keywords'):
      TypeError: entry_points() got an unexpected keyword argument 'group'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

  • 写回答

3条回答 默认 最新

  • Ko-walski 2022-10-11 20:03
    关注

    更新下pip试试呢
    或者pip3 insatll xxx 试试
    再或者 pip install xxxx --use-deprecated=legacy-resolver

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 10月21日
  • 已采纳回答 10月13日
  • 创建了问题 10月11日

悬赏问题

  • ¥15 无法使用此凭据登录,因为你的域不可用,如何解决?(标签-Windows)
  • ¥15 yolov9的训练时间
  • ¥15 二叉树遍历没有报错但无法正常运行
  • ¥15 在linux系统下vscode运行robocup3d上场球员报错
  • ¥15 maven环境配置后无法运行mvn -v
  • ¥15 Python语言实验
  • ¥15 SAP HANA SQL 增加合计行
  • ¥20 用C#语言解决一个英文打字练习器,有偿
  • ¥15 srs-sip外部服务 webrtc支持H265格式
  • ¥15 在使用abaqus软件中,继承到assembly里的surfaces怎么使用python批量调动