File "main.py", line 2 python38 -m pip install selenium ^ SyntaxError: invalid syntax This error comes up when I try to run my code. I am using python on replit and have already imported pip on a previous line. Can anyone give me suggestions on what is wrong here?
I used selenium on replit a few months ago and it does work, but it's not the smoothest experience (especially when you have a free tier).
Installing selenium on replit :
python -m pip install selenium
in shell (next to console)os.system
method (which you can use to execute commands):import os
os.system("python -m pip install -r requirements.txt")
os.system("python -m pip install selenium")
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.