overexchange
overexchange

Reputation: 1

aiohttp module - import error

Installed aiohttp,

pip3 install aiohttp

as mentioned here


With python3.6,

I see below error:

import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

How to resolve this error?

Upvotes: 21

Views: 57821

Answers (2)

Ferris
Ferris

Reputation: 101

I had this issue even on Pycharm. After figuring out which interpreter I use I had to explicitly install aiohttp with pip with the python binary under venv/bin.

Upvotes: 2

Sede
Sede

Reputation: 61225

This is because your pip3 is not in the python3.6 PYTHONPATH. I always think the best way to install Python packages using pip is with to run it as a script using the -m option.

python3.6 -m pip install aiohttp

Upvotes: 42

Related Questions