You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10下安装pyppeteer-ghost-cursor==0.2.3失败求助

解决Windows10下安装pyppeteer-ghost-cursor==0.2.3时的bezier依赖安装错误

问题描述

执行命令 pip install pyppeteer-ghost-cursor==0.2.3 安装包时出现错误,报错信息如下:

Collecting pyppeteer-ghost-cursor==0.2.3
  Using cached pyppeteer_ghost_cursor-0.2.3-py3-none-any.whl (21 kB)
Collecting bezier
  Using cached bezier-2021.2.12.tar.gz (313 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      The BEZIER_INSTALL_PREFIX environment variable must be set.
      [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.

使用Windows10系统,如何解决该安装问题?


解决方法

错误根源是旧版本bezier(2021.2.12)需要手动指定环境变量,以下是三种可行解决方案:

方案一:临时设置环境变量后安装

  1. 打开命令提示符(CMD)或PowerShell
  2. 设置环境变量:
    • CMD环境:
      set BEZIER_INSTALL_PREFIX=C:\PythonXX\Lib\site-packages
      
      (将PythonXX替换为你的实际Python版本,比如Python39,也可直接使用.表示当前目录)
    • PowerShell环境:
      $env:BEZIER_INSTALL_PREFIX = "C:\PythonXX\Lib\site-packages"
      
  3. 执行安装命令:
    pip install pyppeteer-ghost-cursor==0.2.3
    

方案二:先升级bezier再安装目标包

新版本bezier已修复该环境变量要求,且兼容pyppeteer-ghost-cursor==0.2.3:

  1. 安装最新版bezier:
    pip install bezier --upgrade
    
  2. 安装目标包:
    pip install pyppeteer-ghost-cursor==0.2.3
    

方案三:使用虚拟环境(推荐)

避免全局环境依赖冲突,创建虚拟环境后操作:

  1. 创建并激活虚拟环境:
    python -m venv venv
    venv\Scripts\activate
    
  2. 选择上述任意一种方案完成安装

内容的提问来源于stack exchange,提问作者user19419589

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.24 15:27:49