Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Latest commit

 

History

History
72 lines (48 loc) · 2.08 KB

getting_started.rst

File metadata and controls

72 lines (48 loc) · 2.08 KB

Getting Started

Python 3.5 (or higher) only

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.

All platforms with conda

  • 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 or deactivate
  • Linux and macOS: source activate or source deactivate
  • Activate it.

    $ conda activate aio35

  • Install aiohttp:

    $(aio35) pip install aiohttp
    

Platform specific

  • 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.

Create a virtual environment to run examples

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