weixin_45521420 2023-05-24 16:18 采纳率: 12.5%
浏览 12

python安装weditor报错

在cmd命令中安装weditor出现下面情况,安装不成功

Collecting progress~=1.3 (from uiautomator2>=2.10.1->weditor==0.6.4)
  Using cached progress-1.6.tar.gz (7.8 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\Yu7\AppData\Local\Temp\pip-install-26bq4h5p\progress_fbd84c70f0c94af3988bba6aa4708ac8\setup.py", line 8, in <module>
          setup(
        File "D:\python_step\lib\site-packages\setuptools\__init__.py", line 106, in setup
          _install_setup_requires(attrs)
        File "D:\python_step\lib\site-packages\setuptools\__init__.py", line 74, in _install_setup_requires
          dist = MinimalDistribution(attrs)
        File "D:\python_step\lib\site-packages\setuptools\__init__.py", line 56, in __init__
          super().__init__(filtered)
        File "D:\python_step\lib\site-packages\setuptools\dist.py", line 494, 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.

1.降低版本试过了也是安装不了

  • 写回答

1条回答 默认 最新

  • @晓码自在 2023-05-24 16:34
    关注

    该回答引用ChatGPT4与博主@晓码自在合作编写:

    从错误信息来看,这是一个第三方包 progress 的安装问题,导致 weditor 无法安装。

    有几个想法可以试试:

    1. 升级 pip 和 setuptools,然后重试。有时版本过低会导致依赖RESOLUTION问题。
    python -m pip install --upgrade pip setuptools 
    
    
    1. 使用 --no-cache-dir 选项重新安装,清除缓存的软件包。
    pip install weditor --no-cache-dir
    
    
    1. 卸载系统已有的 progress 包,然后重新安装 weditor。
    pip uninstall progress
    pip install weditor
    
    
    1. 下载 progress 的 whl 文件,并本地安装。然后再安装 weditor。

    你可以在 https://www.lfd.uci.edu/~gohlke/pythonlibs/#progress 找到适用于你 Python 版本的 progress whl 文件。然后:

    pip install progress‐1.6‐py3‐none‐any.whl
    pip install weditor
    
    
    1. 如果以上方法都不行,你可以尝试使用虚拟环境来安装 weditor。
    python -m venv venv
    venv\Scripts\activate  # Windows 
    source venv/bin/activate  # Mac/Linux
    pip install weditor
    
    

    在虚拟环境中安装,可以避免与系统 Python 产生依赖等冲突问题。

    这些是解决 Python 包安装问题的常用方法。根据你的错误信息,progress 这个依赖包很可能是造成问题的根源。所以重点还是围绕这个包进行尝试。

    评论

报告相同问题?

问题事件

  • 创建了问题 5月24日

悬赏问题

  • ¥15 请各位帮我看看是哪里出了问题
  • ¥15 vs2019的js智能提示
  • ¥15 关于#开发语言#的问题:FDTD建模问题图中代码没有报错,但是模型却变透明了
  • ¥15 uniapp的h5项目写一个抽奖动画
  • ¥15 TeleScan不能修改bar
  • ¥100 请问我基于逐飞库写的这个有关于mp u6050传感器的函数,为什么输出的值是固定的?
  • ¥15 hadoop中启动hive报错如下怎么解决
  • ¥15 如何优化QWebEngineView 加载url的速度
  • ¥15 关于#hadoop#的问题,请各位专家解答!
  • ¥15 如何批量抓取网站信息