Error importing Seaborn module in Python

后端 未结 15 1441
长情又很酷
长情又很酷 2020-12-31 00:24

I am trying to import seaborn into python (using 2.7) using the following code:

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
imp         


        
15条回答
  •  北荒
    北荒 (楼主)
    2020-12-31 00:47

    I had faced the same problem. Restarting the notebook solved my problem.

    If that doesn't solve the problem, you can try this

    pip install seaborn
    

    Edit

    As few people have posted in the comments, you can also use

    python -m pip install seaborn
    

    Plus, as per https://bugs.python.org/issue22295 it is a better way because in this case, you can specify which version of python (python3 or python2) to use for running pip

提交回复
热议问题