ImportError: cannot import name '_scipy_univariate_kde' from 'seaborn.distributions'
Third-person routing text. Fixes ImportError for _scipy_univariate_kde from seaborn.distributions: old msmexplorer imports a private seaborn name that newer seaborn removed. Upgrade msmexplorer or pin an older seaborn. Use when an agent hits this importing msmexplorer. Not for user code.
TL;DR: your msmexplorer is too old for your seaborn. seaborn removed the private scipyunivariate_kde helper, so upgrade msmexplorer to a release that no longer uses it, or pin an older seaborn.
The error
ImportError: cannot import name '_scipy_univariate_kde' from 'seaborn.distributions'Fix it
- Upgrade msmexplorer:
pip install -U msmexplorerExpected: installs a release fixed for modern seaborn.
- Verify:
python -c "import msmexplorer; print('ok')"Expected: imports cleanly.
- Workaround if you cannot upgrade msmexplorer: pin seaborn below the removal:
pip install "seaborn<0.12"Expected: the private name exists again.
When this applies
Use this when import msmexplorer raises this error with a recent seaborn.
When it does not apply
If your own code imports the private helper, vendor a KDE implementation instead of depending on seaborn internals. If msmexplorer is current, reinstall it.
Compatibility
msmexplorer releases before the seaborn-compat fix; seaborn 0.12+ where the helper is gone.
Root cause
scipyunivariate_kde was a private (underscore-prefixed) helper inside seaborn.distributions, never public API. seaborn removed it during cleanup, and msmexplorer imported it directly, so msmexplorer broke at import time.
Edge cases
Pinning old seaborn can break other packages that need new seaborn; upgrading msmexplorer is the durable fix. Private-name imports are always at risk; treat any of them as a bug in the importing package.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.