This situation is similar to what I have found working with the virtual environment in pythonanywhere using a free account.
In my case, my application written in Flask without using the virtual environment allows me to install the libraries I need (With a bit of luck not to exceed the quota of 512M)
When I tried to configure my application using a virtual environment I found the error:
"ERROR: Could not install packages due to an OSError: [Errno 122] Disk quota exceeded"
I did perform a test to determine whether the virtual environment occupies more space than the required quota allocated to the free accounts without subscription.
So, I did execute the command:
"du -hs /tmp ~/.[!.] ~/ | sort -h"
and I found that the virtual environment without the libraries that I require with the versions that I need occupies in my case 312MB (about 60%) of the 512MB of which are allowed.
For example:
(myvirtualenv) 16:26 ~ $ du -hs /tmp ~/.[!.] ~/ | sort -h
4.0K /home/myaccount/.bashrc
4.0K /home/myaccount/.gitconfig
4.0K /home/myaccount/.profile
4.0K /home/myaccount/.python_history
4.0K /home/myaccount/.pythonstartup.py
4.0K /home/myaccount/README.txt
4.0K /home/myaccount/requirements_for_recordsv1.0.132.txt
8.0K /home/myaccount/.vimrc
2.3M /tmp
22M /home/myaccount/.local
93M /home/myaccount/.cache
312M /home/myaccount/.virtualenvs
I believe that this is the reason why using a virtual environment it is necessary to have a subscription account with the storage capacity required by the application.
In conclusion. When creating a virtual environment in pythonanywhere using a free account, more than half (60%) of the 512MB allocated space is sacrificed since only the virtual environment after being created occupies 312M and that does not include libraries with specific versions that a user wants to install in the virtual environment.
So, if you are working in free account mode, it is recommended to stay as far as possible with the batteries included and if you want to migrate to a virtual environment, the user must purchase a subscription to have more storage capacity.