Home>

pip install seaborn
And the following message appeared after the installation was completed.

Note: you may need to restart the kernel to use updated packages.

When I try to import seaborn after that, I get the following error and cannot import.


Traceback (most recent call last):

File "/Users/hogehoge/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3325, in run_code
exec (code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in
import seaborn as sns

File "/Users/hogehoge/python/seaborn.py", line 8
pip install seaborn
^
SyntaxError: invalid syntax


What exactly should a kernel update do?

not know what to do for beginners, I hope you can tell me.

  • Answer # 1

      

    you may need to restart the kernel to use updated packages.

    This message is not a kernel update.
    I think it means that you need to restart the kernel to use the updated package (here seaborn).

    Is the environment in question a Jupyter Notebook?
    Then, is there an item such as [Kernel]-[Restart] on the upper toolbar?
    Click it if you have one.
    I'm sorry that the environment was different.

    If you describe the environment where the problem is a little more, the tools you are using and their versions, other people may be able to answer.