Skip to content
← Back to Community
no module named requests
Profile icon
axp
--> python3 -m poetry lock Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/__main__.py", line 5, in <module> from .console import main File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/console/__init__.py", line 1, in <module> from .application import Application File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/console/application.py", line 7, in <module> from .commands.about import AboutCommand File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/console/commands/__init__.py", line 4, in <module> from .check import CheckCommand File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/console/commands/check.py", line 2, in <module> from poetry.factory import Factory File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/factory.py", line 16, in <module> from .packages.locker import Locker File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/packages/__init__.py", line 2, in <module> from .locker import Locker File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/packages/locker.py", line 38, in <module> from poetry.utils.extras import get_extra_package_names File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/utils/extras.py", line 7, in <module> from poetry.utils.helpers import canonicalize_name File "/opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/utils/helpers.py", line 11, in <module> import requests ModuleNotFoundError: No module named 'requests' exit status 1

installing requests from the package tab fails

Voters
Profile icon
LuisPerez9
Profile icon
matthiasducoura
Profile icon
paulcruse-syn
Profile icon
Gbit
Profile icon
axp
Comments
hotnewtop
Profile icon
Gbit

I have the exact same issue and ruiwenge2 solution didn't solve the problem. Since I guess poetry depends on the request library to actually install requests

Profile icon
ruiwenge2

you don’t need to install requests. Just do this in the Python code:

import requests
Profile icon
Chaos2356

такая же проблема