The aiohttp module does not come preinstalled with your Python distribution; however, similarly to other packages, you can easily install the module by using the pip or conda commands. We will also be installing another module, aiofiles, which facilitates asynchronous file-writing. If you use pip as your package manager, simply run the following commands:
pip install aiohttp
pip install aiofiles
If you'd like to use Anaconda, run the following commands:
conda install aiohttp
conda install aiofiles
As always, to confirm that you have successfully installed a package, open your Python interpreter and try to import the module. In this case, run the following code:
>>> import aiohttp
>>> import aiofiles
There will be no error messages if the package has been successfully installed.