Since for the bot, we will use a third-party library pytelegrambotapi, we need to install it. PythonAnywhere has a list of preinstalled libraries. PythonAnywhere allows you to install any libraries to a virtual environment. Let's create.
After loading the console, create a virtual environment with virtualenvwrapper tools. To do this, enter the command tgbotvenv mkvirtualenv --python=/usr/bin/python3.6 Where tgbotvenv - the name of the virtual environment, /usr/bin/python3.6 - the path to the executable we need a version of python (version must be the same that was specified when creating the Web application).
Next, install the required modules. pip install flask pytelegrambotapi (if in the future you will need to install the modules, enter the command workon tgbotvenv then you can safely install. Detailed instructions for using virtualenvwrapper).
Next, in the tab "Web" in the "Virtualenv", you need to specify the path to the virtual environment or its name.