安装playwrigt遇到的问题,亲测
本人python3.7 系统win10
首先安装 : pip install playwright, 显示以下内容无法安装
WARNING: Ignoring invalid distribution -ip (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) Requirement already satisfied: playwright in d:\install_soft\python\lib\site-packages (1.21.0) Requirement already satisfied: typing-extensions in d:\install_soft\python\lib\site-packages (from playwright) (3.10.0.0) Requirement already satisfied: pyee8.1.0 in d:\install_soft\python\lib\site-packages (from playwright) (8.1.0) Requirement already satisfied: greenlet1.1.2 in d:\install_soft\python\lib\site-packages (from playwright) (1.1.2) Requirement already satisfied: websockets==10.1 in d:\install_soft\python\lib\site-packages (from playwright) (10.1) WARNING: Ignoring invalid distribution -ip (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages)
为了让它可以安装我们需要进入d:\install_soft\python\lib\site-packages 删除 -ip 和illow 结尾的文件
删除后,继续安装。 再次显示
WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) Requirement already satisfied: playwright in d:\install_soft\python\lib\site-packages (1.21.0) Requirement already satisfied: greenlet1.1.2 in d:\install_soft\python\lib\site-packages (from playwright) (1.1.2) Requirement already satisfied: websockets10.1 in d:\install_soft\python\lib\site-packages (from playwright) (10.1) Requirement already satisfied: pyee==8.1.0 in d:\install_soft\python\lib\site-packages (from playwright) (8.1.0) Requirement already satisfied: typing-extensions in d:\install_soft\python\lib\site-packages (from playwright) (3.10.0.0) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages) WARNING: Ignoring invalid distribution -illow (d:\install_soft\python\lib\site-packages)
然后我们这时候需要更改安装路径即可:代码命令如下 pip install --target=d:\install_soft\python\lib\site-packages playwright
完美解决无法安装问题…
为了使用playwrite 还有1个命令需要安装:
playwrite install
即可。。。。。。。
|