Closed
Description
Once recognized, this was trivially mitigated by running pip install requests
, so no support is needed.
Environment details
- OS: Linux experimental-1 5.10.0-14-cloud-amd64 Internal transport discussion #1 SMP Debian 5.10.113-1 (2022-04-29) x86_64 (Cloud Compute Engine instance)
- Python version: Python 3.9.2
- pip version: pip 20.3.4
google-auth
version: 2.8.0
Steps to reproduce
- Setup new clean python environment:
sudo apt update
sudo apt install python3 python3-dev python3-venv
sudo apt-get install wget
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
python3 -m venv env
source env/bin/activate
pip install --upgrade google-auth
- Run python and try to import;
python3
>>> import google.oauth2.id_token
- Exception results:
Traceback (most recent call last):
File "/home/bramsterling/tokenexpt/env/lib/python3.9/site-packages/google/auth/transport/requests.py", line 26, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/bramsterling/tokenexpt/env/lib/python3.9/site-packages/google/oauth2/id_token.py", line 67, in <module>
import google.auth.transport.requests
File "/home/bramsterling/tokenexpt/env/lib/python3.9/site-packages/google/auth/transport/requests.py", line 30, in <module>
six.raise_from(
File "<string>", line 3, in raise_from
ImportError: The requests library is not installed, please install the requests package to use the requests transport.