Skip to content

Commit 7c478d7

Browse files
committed
fix error messages closes pandas-dev#18089
1 parent 27bbea7 commit 7c478d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
tslib as _tslib)
2929
except ImportError as e: # pragma: no cover
3030
# hack but overkill to use re
31-
module = str(e).replace('cannot import name ', '')
31+
module = str(e).replace('cannot import name ', '')\
32+
.replace('No module named ', '')
33+
if 'does not export' in module:
34+
# GH#18089
35+
raise
3236
raise ImportError("C extension: {0} not built. If you want to import "
3337
"pandas from the source directory, you may need to run "
3438
"'python setup.py build_ext --inplace --force' to build "

0 commit comments

Comments
 (0)