PythonAnywhere Gist Console Install Packages


I am trying to set up a gist console on python anywhere to run a gist on GitHub. The problem is that the python script makes use of the pyinputplus package, which is not installed by default. I can't figure out how to get it to install. I've tried adding pip install --user pyinputplus and pip3.5 install --user pyinputplus to the top of my script on GitHub, but this always results in a syntax error. If anybody can help me solve this problem, I'd appreciate it.


pip is a Bash command, so you'd need to shell out to do it -- something like this at the top of your script should work:

import subprocess
subprocess.check_call(["pip3.5", "install", "--user", "pyinputplus"])

Thanks very much!

This seems to work. The only problem is that I now get an error saying that my disk quota is exceeded when I try to run the gist. When I look at my dashboard, though, it says I've only used 5.4 MB of my 512 MB quota.

Any idea why that would be?

I really appreciate the help.

hi, which gist is it? does it only just do the pip install? or does it do more stuff after that?

i took a brief look at pyinputplus, and it seems like it is very light weight. but if it is say in the 100s of MBs then maybe installing + building a wheel + temporary files etc would have taken you past the quota.

Hi, thanks for responding.

The Gist is located at:

It uses a couple of other modules: shelve, time, os, and random. These all seem to be available through pythonanywhere and don't need to be installed as far as I can tell.

Thanks for any help you can provide.

The Gist actually runs fine on my account when I am logged in. I believe this is because I have already installed pythonanywhere from bash.

My hope is to be able to share the gist so that somebody else could run it. When I try to run the link in another browser is when I have to install pyinputplus and then get the error message.

The link that I'm using is:

Thanks again for your help.

We have stricter limits on the disk size for gists that are run anonymously than if they are run directly in user accounts, so it looks like the package just does not fit into the space that we allow for anonymous consoles.