PythonDataScienceHandbook icon indicating copy to clipboard operation
PythonDataScienceHandbook copied to clipboard

seaborn is not importing

Open j7sai opened this issue 7 years ago • 2 comments

import seaborn as sns no module named as seaborn /
this error even after installing in conda install seaborn can anybody fix this

j7sai avatar Apr 10 '18 06:04 j7sai

You can try installing seaborn library in your python script using following code:

import conda.cli

conda.cli.main('conda', 'install', '-y', 'seaborn')

You can also do it by using pip but ensure that the version of pip is not 10.0.0 as the new version doesn't support pip.main() any more.For installing seaborn library using pip you can write the following code in your python script.

import pip

pip.main(['install','seaborn'])

One more thing for installing seaborn library it is a mandatory requirement that numpy,pandas,matplotlib and scipy libraries are already installed in your computer.

You can also check following link for more information

https://seaborn.pydata.org/installing.html

neilsaxena avatar Jun 09 '18 15:06 neilsaxena

run on jupyter notebook !pip install seaborn or !pip3 install seaborn (if you use python3.X)

BrunaFortunato-eng avatar Oct 29 '21 21:10 BrunaFortunato-eng