Okay, the above answer is correct, an extension to that.
use python3 main.py
to run your code.
glitch
accepts to use start.sh
file, that runs the start up script.
If you are using some packages, you will need to install them, which we generally do using pip
. But, Glitch pip
runtime installs those packages in python 2
directory. So, even after using python3
in start.sh
in Glitch project, it doesn't work.
Here's the work around.
Use Python to install packages.
Following codes will do:
python3 -m pip install -U pip
python3 -m pip install -r requirements.txt
python3 main.py
Add above codes in start.sh
- we're first upgrading pip using python3 (which we usually do)
- Install all packages in
requirements.txt
( don't forget s
here, I did :|)
- start the
main.py
Additionally, if you want to install a package separately, use python3 -m pip install <package_name>
.
Have fun. Your project just launched successfully.