How to host A python Telegram bot on my pc

I made a very simple chat bot for telegram using the pytelegrambotapi and wanted to run it from my pc, now running it from the IDE works just fine but I was wondering if there was any way I can for example get it to run as a .exe file? I tried using pyinstaller and it generated a .exe file that opens and closes in less than a second.

Source: Python Questions