Skip to content

Commit f2b7bd8

Browse files
committed
improve optional import error message
1 parent e6da5f2 commit f2b7bd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/compat/_optional.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ def import_optional_dependency(
152152
install_name = package_name if package_name is not None else name
153153

154154
msg = (
155-
f"Missing optional dependency '{install_name}'. {extra} "
156-
f"Use pip or conda to install {install_name}."
155+
f"`Import {install_name}` failed. {extra} "
156+
f"Use pip or conda to install the {install_name} package."
157157
)
158158
try:
159159
module = importlib.import_module(name)

0 commit comments

Comments
 (0)