how to install python modules on pythonanywhere.com . if you a are like me to do create basis python script for running automation online, then it will interest you to know that you can run python script on pythonanywhere.com website which keeps it running 24hours. with this, you can run, host your python script online and have the job done for you without internet connection since pythonanywhere will get the job done for you. so in essence, with pythonanywhere, you can host your python script online if you want to use flask or django. but in my own case, i do often just want to run the python script like.
How To Host Python Script Online
now the issue most internet users often experience with pythonanywhere is that by default it runs on python2.7 as at the time of writing this post. maybe it may have been upgraded. but in any case, if you want to install any python modules to use, it automatically installs it on python2.7 version because that is what it is running on. so if you want to install it on upgraded python versions such as python 3.8, 3.7 or higher depending on what is available there, then here is how to install any python module on pythonanywhere.com website running on python3.7, python3.8, python3.9 etc.
this process will enable you to switch the install to python3.8 or higher version. just follow the steps below.
how to install python modules on pythonanywhere python3.7, python3.8, python3.9
STEP1: after creating an account with pythonanywhere.com, then if you want to install modules, click on the option called "console"
STEP2: it will take you to the page where you can create Batch
STEP3: it will open python terminal to enable you install any python module. all you need to do is to use this code below and replace the modulename with what you want to install
pip3.7 install --user requests
so if you wish to install on python 3.8, then change the python version to python3.8, e.g
pip3.8 install --user requests
don't forget to add the --user as part of the code.
with this you can install any python module on pythonanywhere.com website
now if you want to run any python script from pythonanywhere hosting site, then open a batch and then type
this will run the python script using python 3.8 version. you can change the version to any python version if you wish. but make sure the python script is already uploaded to the pythonanywhere by clicking the option called File, an upload your script there.
to view the latest post update you are not seeing right now.
more articles update is posted on gurubest
every day,so don't be the last to get update to your email.Subscribe by emailDON'T FORGET TO SHARE WITH YOUR FRIENDS ON FACEBOOK BY CLICKING THE SHARE BUTTON
No Responses to "how to install python modules on pythonanywhere.com "
Post a Comment