Skip to content

Commit 598edbe

Browse files
committed
update import error
1 parent 2378d40 commit 598edbe

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

google/auth/transport/urllib3.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,18 @@
3434
try:
3535
import urllib3 # type: ignore
3636
import urllib3.exceptions # type: ignore
37+
from packaging import version # type: ignore
3738
except ImportError as caught_exc: # pragma: NO COVER
3839
raise ImportError(
39-
"The urllib3 library is not installed from please install the "
40-
"urllib3 package to use the urllib3 transport."
40+
"Error: Missing 'urllib3' dependency for 'google-auth'."
41+
" The 'google-auth' library requires 'urllib3' for its default network transport."
42+
"\n"
43+
"Please install the necessary dependency using pip:\n"
44+
" pip install google-auth[urllib3]\n"
45+
"\n"
46+
"(Note: Using 'google-auth[urllib3]' ensures all dependencies are installed. We recommend running this in your virtual environment.)"
4147
) from caught_exc
4248

43-
from packaging import version # type: ignore
4449

4550
from google.auth import environment_vars
4651
from google.auth import exceptions

0 commit comments

Comments
 (0)