Estoy usando el editor IDLE (Python 3.10 64 bit)
He instalado la libreria REQUESTS para hacer llamadas API GET, POST, ...
C:\python>pip install requests
Requirement already satisfied: requests in c:\python\lib (2.28.1)
Requirement already satisfied: idna<4,>=2.5 in c:\python\lib (from requests) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\python\lib (from requests) (2.1.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\python\lib (from requests) (2022.9.24)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\python\lib (from requests) (1.26.12)
Tengo el siguiente código
Código:
import requests
Al ejecutarlo me salen estos errores que no sé como resolver.
ERRORES:
Traceback (most recent call last):
File "C:\python\email3.py", line 5, in <module>
import requests
File "C:\python\lib\requests\__init__.py", line 43, in <module>
import urllib3
File "C:\python\lib\urllib3\__init__.py", line 11, in <module>
from . import exceptions
File "C:\python\lib\urllib3\exceptions.py", line 3, in <module>
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
File "C:\python\lib\urllib3\packages\six.py", line 234, in create_module
return self.load_module(spec.name)
File "C:\python\lib\urllib3\packages\six.py", line 209, in load_module
mod = mod._resolve()
File "C:\python\lib\urllib3\packages\six.py", line 118, in _resolve
return _import_module(self.mod)
File "C:\python\lib\urllib3\packages\six.py", line 87, in _import_module
__import__(name)
File "C:\python\lib\http\client.py", line 71, in <module>
import email.parser
ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package
¿Alguna tiene idea de lo que puede estar pasando? Gracias
Si no encuentro solución igual debería usar otra librería para API ¿me aconsejais alguna?
Gracias