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