Search code examples
pythonpython-3.xseabornspyder

Not able to install seaborn libraries in python : Spyder


i am fairly new to this python programming language. i have installed anaconda, python and spyder (each separately) in my system. When working in spyder environment i am using the following command to install seaborn library

!pip install seaborn

and i am getting the following result

\users\16111317\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (0.11.1)
Requirement already satisfied: pandas>=0.23 in c:\program files\spyder\pkgs (from seaborn) (1.2.4)
Requirement already satisfied: numpy>=1.15 in c:\program files\spyder\pkgs (from seaborn) (1.19.3)
Requirement already satisfied: matplotlib>=2.2 in c:\program files\spyder\pkgs (from seaborn) (3.4.2)
Requirement already satisfied: scipy>=1.0 in c:\program files\spyder\pkgs (from seaborn) (1.6.3)
Requirement already satisfied: pyparsing>=2.2.1 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (0.10.0)
Requirement already satisfied: python-dateutil>=2.7 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (1.3.1)
Requirement already satisfied: pillow>=6.2.0 in c:\program files\spyder\pkgs (from matplotlib>=2.2->seaborn) (8.2.0)
Requirement already satisfied: six in c:\program files\spyder\pkgs (from cycler>=0.10->matplotlib>=2.2->seaborn) (1.16.0)
Requirement already satisfied: pytz>=2017.3 in c:\program files\spyder\pkgs (from pandas>=0.23->seaborn) (2021.1)

but when i call the library using the command

import seaborn as sns

it gives the following error

Traceback (most recent call last):

  File "<ipython-input-3-a84c0541e888>", line 1, in <module>
    import seaborn as sns

ModuleNotFoundError: No module named 'seaborn'

Can someone please help


Solution

  • Install seaborn library using the cmd start > run> cmd then use the command :

    python -m pip install seaborn
    

    this should install the package, then you can use the python command line to check by import seaborn you can also check the installed packages using the command in the cmd:

    pip list