aiohttp module – import error

Question:

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?

Asked By: overexchange

||

Answers:

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
Answered By: styvane

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.

Answered By: Ferris

I’m facing the same issue.
I tried what was marked as the best answer but it didn’t work for me.

I’m using aiohttp==3.8.1 , which is apparently the most stable version.
If I check if it is installed in the project from terminal, it says so. But when I try to convert to a exe module, it just doesn’t load the packege.

Does anyone have any idea of what I might be doing wrong?

By the way, python 3.10.7

Answered By: Vinicius
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.