Hello,
I'm trying to install Playwright and I'm really not very sure what I'm doing.
Per the docs: https://github.com/microsoft/playwright-python#evaluate-js-in-browser
One must perform 2 steps: pip install playwright python -m playwright install
I've pip installed playwright on my python3.8 virtual env but am unable to complete the second step. I've tried to cd into the directories that contain playwright prior to entering the "python -m playwright install" command but am getting the following:
(
my-virtualenv) 20:48 ~/.local/lib/python3.8/site-packages/playwright $ cd /home/nweather2/.local/lib/python3.8/site-packages/playwright
(my-virtualenv) 20:48 ~/.local/lib/python3.8/site-packages/playwright $ python -m playwright install
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/nweather2/.local/lib/python3.8/site-packages/playwright/playwright.py", line 17, in <module>
from playwright.browser_type import BrowserType
File "/home/nweather2/.local/lib/python3.8/site-packages/playwright/playwright.py", line 17, in <module>
from playwright.browser_type import BrowserType
ModuleNotFoundError: No module named 'playwright.browser_type'; 'playwright' is not a package
Can anyone help?
Thanks.