diff --git a/pandas/__init__.py b/pandas/__init__.py index 1a549c09d22f7..6ddfbadcf91d1 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -18,20 +18,18 @@ ) del _hard_dependencies, _dependency, _missing_dependencies -# numpy compat -from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401 - try: - from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib + # numpy compat + from pandas.compat import ( + is_numpy_dev as _is_numpy_dev, # pyright: ignore # noqa:F401 + ) except ImportError as _err: # pragma: no cover _module = _err.name raise ImportError( f"C extension: {_module} not built. If you want to import " "pandas from the source directory, you may need to run " - "'python setup.py build_ext --force' to build the C extensions first." + "'python setup.py build_ext' to build the C extensions first." ) from _err -else: - del _tslib, _lib, _hashtable from pandas._config import ( get_option,