Im running this dockerfile and I get: ERROR Run python -m playwright install /bin/sh python: not found
FROM mcr.microsoft.com/playwright:focal
RUN apt-get update && apt-get install -y python3-pip
COPY . .
RUN pip3 install TikTokApi
RUN python -m playwright install // Results in error
If you want aPlaywright image with Python instead of the Playwright image with Node you have currently set,
do
FROM mcr.microsoft.com/playwright/python:v1.23.0-focal
instead. You won't then need to install python3-pip
(or playwright!) at all.
Additionally, you'll probably want to explicitly spell out python3
instead of python
:
FROM mcr.microsoft.com/playwright/python:v1.23.0-focal
RUN pip3 install TikTokApi
RUN playwright install
COPY . .
在 vscode 的终端中,输入sudo apt install python-is-python3
然后重启,它应该可以工作了。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.