8000 pip install google-auth did not install requests dependency · Issue #1069 · googleapis/google-auth-library-python · GitHub
[go: up one dir, main page]

Skip to content
pip install google-auth did not install requests dependency #1069
Closed
@sterlinb

Description

@sterlinb

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

  1. 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
  1. Run python and try to import;
python3
>>> import google.oauth2.id_token
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0