Import seaborn in jupyter notebook shows Error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 import seaborn as sns

File ~\anaconda3\Lib\site-packages\seaborn\__init__.py:5
      3 from .utils import *  # noqa: F401,F403
      4 from .palettes import *  # noqa: F401,F403
----> 5 from .relational import *  # noqa: F401,F403
      6 from .regression import *  # noqa: F401,F403
      7 from .categorical import *  # noqa: F401,F403

File ~\anaconda3\Lib\site-packages\seaborn\relational.py:17
      8 from ._oldcore import (
      9     VectorPlotter,
     10 )
     11 from .utils import (
     12     locator_to_legend_entries,
     13     adjust_legend_subtitles,
     14     _default_color,
     15     _deprecate_ci,
     16 )
---> 17 from ._statistics import EstimateAggregator
     18 from .axisgrid import FacetGrid, _facet_docs
     19 from ._docstrings import DocstringComponents, _core_docs

File ~\anaconda3\Lib\site-packages\seaborn\_statistics.py:31
     29 import pandas as pd
     30 try:
---> 31     from scipy.stats import gaussian_kde
     32     _no_scipy = False
     33 except ImportError:

File ~\anaconda3\Lib\site-packages\scipy\stats\__init__.py:606
      1 """
      2 .. _statsrefmanual:
      3 
   (...)
    601 
    602 """  # noqa: E501
    604 from ._warnings_errors import (ConstantInputWarning, NearConstantInputWarning,
    605                                DegenerateDataWarning, FitError)
--> 606 from ._stats_py import *
    607 from ._variation import variation
    608 from .distributions import *

File ~\anaconda3\Lib\site-packages\scipy\stats\_stats_py.py:49
     47 import scipy.special as special
     48 from scipy import linalg
---> 49 from . import distributions
     50 from . import _mstats_basic as mstats_basic
     51 from ._stats_mstats_common import (_find_repeats, linregress, theilslopes,
     52                                    siegelslopes)

File ~\anaconda3\Lib\site-packages\scipy\stats\distributions.py:11
      8 from ._distn_infrastructure import (rv_discrete, rv_continuous, rv_frozen)  # noqa: F401
     10 from . import _continuous_distns
---> 11 from . import _discrete_distns
     13 from ._continuous_distns import *  # noqa: F403
     14 from ._levy_stable import levy_stable

File ~\anaconda3\Lib\site-packages\scipy\stats\_discrete_distns.py:10
      8 from scipy.special import entr, logsumexp, betaln, gammaln as gamln, zeta
      9 from scipy._lib._util import _lazywhere, rng_integers
---> 10 from scipy.interpolate import interp1d
     12 from numpy import floor, ceil, log, exp, sqrt, log1p, expm1, tanh, cosh, sinh
     14 import numpy as np

File ~\anaconda3\Lib\site-packages\scipy\interpolate\__init__.py:167
      1 """
      2 ========================================
      3 Interpolation (:mod:`scipy.interpolate`)
   (...)
    165 (should not be used in new code).
    166 """
--> 167 from ._interpolate import *
    168 from ._fitpack_py import *
    170 # New interface to fitpack library:

File ~\anaconda3\Lib\site-packages\scipy\interpolate\_interpolate.py:14
     11 from scipy._lib._util import copy_if_needed
     12 from scipy.special import comb
---> 14 from . import _fitpack_py
     15 from . import dfitpack
     16 from ._polyint import _Interpolator1D

File ~\anaconda3\Lib\site-packages\scipy\interpolate\_fitpack_py.py:8
      5 import numpy as np
      7 # These are in the API for fitpack even if not used in fitpack.py itself.
----> 8 from ._fitpack_impl import bisplrep, bisplev, dblint  # noqa: F401
      9 from . import _fitpack_impl as _impl
     10 from ._bsplines import BSpline

File ~\anaconda3\Lib\site-packages\scipy\interpolate\_fitpack_impl.py:103
     52 _iermess = {
     53     0: ["The spline has a residual sum of squares fp such that "
     54         "abs(fp-s)/s<=0.001", None],
   (...)
     68     'unknown': ["An error occurred", TypeError]
     69 }
     71 _iermess2 = {
     72     0: ["The spline has a residual sum of squares fp such that "
     73         "abs(fp-s)/s<=0.001", None],
   (...)
     99     'unknown': ["An error occurred", TypeError]
    100 }
    102 _parcur_cache = {'t': array([], float), 'wrk': array([], float),
--> 103                  'iwrk': array([], dfitpack_int), 'u': array([], float),
    104                  'ub': 0, 'ue': 1}
    107 def splprep(x, w=None, u=None, ub=None, ue=None, k=3, task=0, s=None, t=None,
    108             full_output=0, nest=None, per=0, quiet=1):
    109     # see the docstring of `_fitpack_py/splprep`
    110     if task <= 0:

TypeError:

I don’t think this is related to Jupyter or JupyterHub, so you might be better off asking in a seaborn or scipy Q&A, but check the versions of the packages you have and make sure they are compatibile, e.g. with conda list and possibly pip check.

Hi, I meet with the same error. Did you fix it?

Yeah I just checked in the chat gpt that which version of panda and others library are compatible with seaborn and then installed that version of seaborn again in my Collab and it worked