Webbot not working
So, with Polygott, I ran the command:
pip3 install webbot
which worked fine.
[insert install prompt]
However, in index.py
when I ran
"""
...
...
...
...
...
...
"""
import webbot
web = webbot.Browser()
web.go_to("https://repl.it")
while True:
print(input("Finished."))
It said module webbot is not found
:(
Can someone please tell me what when wrong? Thanks!
AdCharity (1317)
if giothecoder answered it mark him right...
Coder100 (17045)
Oh yes, ok @AdCharity
It isn’t a permanent install because security, so you’ll have to install it every time
What do you mean by that? How can I fix it then? @Giothecoder
I could do the same for express with node.js, so what's the exception with python? @Giothecoder
@Coder100 there isn’t one, the same would happen for node packages. All you have to do is make sure to install the packages each time. So now instead of installing it once, just install it every time so instead of having
python index.py
It’ll be
pip3 install webbot ; python index.py
If you can figure out how to check for you dependencies, do it - it’s really the only way of doing this efficiently, but otherwise just install everything every time instead,
Ok. Thanks! @Giothecoder
Oh, I see why the node.js works: I have a package.json that specifies express, so do you know a way that is the same with python? @Giothecoder
@Coder100 yes I think, you use a requirements.txt file with just a list of the pkgs
Ok, this is so annoying ugh I can get colored, but not webbot argh @Giothecoder
@Coder100 I don’t think so, it actually looks like it doesn’t work for colored because when I run it it says it can’t find a module named colored
Huh, weird it worked for me @Giothecoder
@Coder100 really? What error are you getting? This is a strange situation lol
I'm not getting an error, I just see orange hello world message (sort of unexpected since background is supposed to be yellow, but I guess that's just a terminal thing) @Giothecoder
Is that supposed to happen? @Coder100
Yeah pretty sure, I tested it before on a python project and that was the same result @Giothecoder
@Coder100 oh ok, so what the problem then again? Little confused now lol
Things that open up application windows like webbot and py game don't want to work however terminal things like colored do work makes since that's kind of confusing lol I'll try flask now @Giothecoder
@Coder100 ok.
Flask doesn't work either :( @Giothecoder
Darnnn what is this blech @Coder100
IKR I'll dm the devs on discord, maybe it's just a bug lol @Giothecoder
@Coder100 maybe... what if you tried transferring the code to a pygame repl and using pygame and just configuring the run button?
Ok I'll try that @Giothecoder
@Coder100 🤞 fingers crossed hope that helps.
It works! However I don't know what to do next @Giothecoder
@Coder100 what do you mean? For what?
For transferring the successful test to polygott @Giothecoder
@Coder100 um. Quick question why are you using a polygott repl? You may not necessarily need it.
I would use it for node.js puppeteer until repl.it makes a way to do so otherwise @Giothecoder
@Coder100 there is another way. Just configure the run button with a .replit file
What do you mean? @Giothecoder
@Coder100 you make a file called
.replit
, and then in that file you putrun="commands"
wherecommands
are the things you want the repl to do when you click run. An example would be some thing likemain.py
.replit
Edit: the commands are just bash commands, it’s the same exact range of function as the polygott repl for which you were using it.
Ok I'll try that @Giothecoder
@Coder100 cool. Should work now lol.
Thanks! Any way to add more lines? @Giothecoder
@Coder100 yeah, just put a semicolon like you would in bash:
node index.js ; python main.py ; echo done
Ok. Thank you! @Giothecoder
@Coder100 yw! Happy coding. :)