This documentation is written for Python 3.5 to avail of the new
async
and await
keywords.
If you have Python 3.5 installed you only need to install aiohttp
:
pip install -U aiohttp
If you don't have Python 3.5 installed yet, you have several options to install it.
Download and install Miniconda for our platform.
Create a new Python 3.5 environment (named
aio35
, use a different if you like):.. highlight:: bash
conda create -n aio35 python=3.5
Activate it. Linux and OS X:
.. highlight:: bash
$ source activate aio35
Windows:
.. highlight:: bash
$ source activate aio35
Install
aiohttp
:.. highlight:: bash
$(aio35) pip install aiohttp
- Windows: The easiest way to use Python 3.5 would be to use a package manager such as conda. See the installation instructions above.
- Mac OS X: Install Homebrew and
then type
brew install python3
- Linux: Ubuntu 16.04+ and Arch linux ship with Python 3.5 included. If you don't have Python 3.5+ on your computer, you can compile it or use Pythonz.
If you don't use conda (see above), create a virtual environment:
python3 -m venv venv
Note
Depending on your platform, the Python 3 interpreter could be invoked by
python
instead. This is the case for conda on Windows for example.
Install aiohttp
in the virtual environment:
./venv/bin/python -m pip install -U aiohttp