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
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):conda create -n aio35 python=3.5
Note
conda activate
and conda deactivate
only work on conda 4.6 and later versions.
For conda versions prior to 4.6, run:
- Windows:
activate
ordeactivate
- Linux and macOS:
source activate
orsource deactivate
- Activate it.
$ conda activate aio35
Install
aiohttp
:$(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