aiohttp module - import error
Asked Answered
M

2

21

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?

Myrna answered 14/7, 2017 at 1:3 Comment(0)
T
41

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
Teller answered 14/7, 2017 at 5:33 Comment(0)
G
2

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.

Goldbrick answered 16/8, 2022 at 17:1 Comment(1)
I had a similar issue with Pycharm when running python for virtual environment from command line. I had to exit the shell, make sure that PyCharm does not activate the virtual environment (deactivate), active it by hand and then run python.Engagement

© 2022 - 2024 — McMap. All rights reserved.