Home > Back-end >  How to install playwright on Jupyter Notebook?
How to install playwright on Jupyter Notebook?

Time:09-30

Halo good people,

I want to scrape data from TikTok by using TikTokApi by David Teather. I stuck on installing step. Here are installing guide from github

pip install TikTokApi
python -m playwright install

I stuck on second line installation

File "<ipython-input-9-33e88bce12a3>", line 1
  python -m playwright install
            ^
SyntaxError: invalid syntax

I guess the trouble are on environment, but how can I find on Jupyter Notebook ? I also attached tutorial on video by David Teather itself using Visual Studio Code

thank you for any help!

CodePudding user response:

It looks like you're trying to run python -m playwright install as python code rather than a shell command. Try running !python -m playwright install to signal to jupyter that this a shell command rather than python code. Use the ! prefix anytime you need to run a shell command on your environment in jupyter.

  • Related