jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.74k stars 4.98k forks source link

Kernel fail on matplotlib.pyplot.show() #1538

Open axhue opened 8 years ago

axhue commented 8 years ago

Hey everyone!

I have been trying to get started with Jupyter and I keep hitting a wall of trying to show graphs inline! There was a previous issue closed where people used %matplotlib inline in a cell before plotting but that did not fix it for me. Also there is no error output on the cmd other than kernel restarting.

Here is the notebook: (I also tried it using only matplotlib but same thing happens without any output)

%matplotlib inline import seaborn as sns tips = sns.load_dataset('tips') sns.regplot(x='total_bill',y='tip',data=tips) Out[3]: <matplotlib.axes._subplots.AxesSubplot at 0x858ca70>

Here is my conda info --all command

Current conda install:

             platform : win-32
        conda version : 3.18.8
  conda-build version : 1.18.2
       python version : 3.5.1.final.0
     requests version : 2.8.1
     root environment : C:\Users\Imran\Anaconda3  (writable)
  default environment : C:\Users\Imran\Anaconda3
     envs directories : C:\Users\Imran\Anaconda3\envs
        package cache : C:\Users\Imran\Anaconda3\pkgs
         channel URLs : https://conda.anaconda.org/spacy/win-32/
                        https://conda.anaconda.org/spacy/noarch/
                        https://repo.continuum.io/pkgs/free/win-32/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/win-32/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : C:\Users\Imran\.condarc
    is foreign system : False

# conda environments:
#
root                  *  C:\Users\Imran\Anaconda3

sys.version: 3.5.1 |Anaconda 2.4.1 (32-bit)| (default...
sys.prefix: C:\Users\Imran\Anaconda3
sys.executable: C:\Users\Imran\Anaconda3\python.exe
conda location: C:\Users\Imran\Anaconda3\lib\site-packages\conda
conda-build: C:\Users\Imran\Anaconda3\Scripts\conda-build.exe
conda-convert: C:\Users\Imran\Anaconda3\Scripts\conda-convert.exe
conda-develop: C:\Users\Imran\Anaconda3\Scripts\conda-develop.exe
conda-env: C:\Users\Imran\Anaconda3\Scripts\conda-env.exe
conda-index: C:\Users\Imran\Anaconda3\Scripts\conda-index.exe
conda-inspect: C:\Users\Imran\Anaconda3\Scripts\conda-inspect.exe
conda-metapackage: C:\Users\Imran\Anaconda3\Scripts\conda-metapackage.exe
conda-pipbuild: C:\Users\Imran\Anaconda3\Scripts\conda-pipbuild.exe
conda-server: C:\Users\Imran\Anaconda3\Scripts\conda-server.exe
conda-sign: C:\Users\Imran\Anaconda3\Scripts\conda-sign.exe
conda-skeleton: C:\Users\Imran\Anaconda3\Scripts\conda-skeleton.exe
user site dirs:

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: C:\Users\Imran\Anaconda3
CONDA_ENVS_PATH: <not set>
PATH: C:\Users\Imran\Anaconda3\Library\bin;C:\Users\Imran\Anaconda3;C:\Users\Imran\Anaconda3\Scripts;C:\Users\Imran\Anaconda3\Library\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Python34;C:\Python34\Scripts;C:\Program Files\MATLAB\R2013b\runtime\win64;C:\Program Files\MATLAB\R2013b\bin;C:\Program Files\MATLAB\R2013b\polyspace\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\Program Files\doxygen\bin;C:\Users\Imran\AppData\Roaming\npm;C:\Program Files (x86)\mingw-w64\i686-5.2.0-posix-dwarf-rt_v4-rev1\mingw32\bin\;C:\Program Files\Docker Toolbox
PYTHONHOME: <not set>
PYTHONPATH: <not set>

License directories:
    C:\Users\Imran\.continuum
    C:\Users\Imran\Anaconda3\licenses
    C:\Users\Imran\AppData\Roaming\Continuum
License files (license*.txt)
Package/feature end dates:

Appreciate the help!

takluyver commented 8 years ago

Try running %matplotlib inline in a separate cell beforehand. I forget if it affects that, but some things like that don't properly kick in until after the cell finishes running.

takluyver commented 8 years ago

Oh, just saw you've already tried that, nevermind.

Svidro commented 6 years ago

I am getting something very similar in Win10, also just starting with Jupyter and trying to create a plot after using the inline command. Kernel always restarts on the plot function call, with cmd window showing

Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll. [I 22:46:57.825 NotebookApp] KernelRestarter: restarting kernel (1/5)

Windows gives a similar python.exe error saying that ordinal 225 could not be located in mkl_intel_thread.dll

I have completely uninstalled all other versions of python, and Anaconda itself a few times, with no change in the error.

conda info --all Current conda install:

           platform : win-64
      conda version : 4.3.30
   conda is private : False
  conda-env version : 4.3.30
conda-build version : 3.0.27
     python version : 3.6.3.final.0
   requests version : 2.18.4
   root environment : C:\Users\Svidro\Anaconda3  (writable)
default environment : C:\Users\Svidro\Anaconda3
   envs directories : C:\Users\Svidro\Anaconda3\envs
                      C:\Users\Svidro\AppData\Local\conda\conda\envs
                      C:\Users\Svidro\.conda\envs
      package cache : C:\Users\Svidro\Anaconda3\pkgs
                      C:\Users\Svidro\AppData\Local\conda\conda\pkgs
       channel URLs : https://repo.continuum.io/pkgs/main/win-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/win-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/win-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/win-64
                      https://repo.continuum.io/pkgs/pro/noarch
                      https://repo.continuum.io/pkgs/msys2/win-64
                      https://repo.continuum.io/pkgs/msys2/noarch
        config file : None
         netrc file : None
       offline mode : False
         user-agent : conda/4.3.30 requests/2.18.4 CPython/3.6.3 Windows/10 Windows/10.0.16299
      administrator : False

conda environments:

# root * C:\Users\Svidro\Anaconda3

sys.version: 3.6.3 |Anaconda, Inc.| (default, Oct 15 ... sys.prefix: C:\Users\Svidro\Anaconda3 sys.executable: C:\Users\Svidro\Anaconda3\python.exe conda location: C:\Users\Svidro\Anaconda3\lib\site-packages\conda conda-build: C:\Users\Svidro\Anaconda3\Scripts\conda-build.exe conda-convert: C:\Users\Svidro\Anaconda3\Scripts\conda-convert.exe conda-develop: C:\Users\Svidro\Anaconda3\Scripts\conda-develop.exe conda-env: C:\Users\Svidro\Anaconda3\Scripts\conda-env.exe conda-index: C:\Users\Svidro\Anaconda3\Scripts\conda-index.exe conda-inspect: C:\Users\Svidro\Anaconda3\Scripts\conda-inspect.exe conda-metapackage: C:\Users\Svidro\Anaconda3\Scripts\conda-metapackage.exe conda-render: C:\Users\Svidro\Anaconda3\Scripts\conda-render.exe conda-server: C:\Users\Svidro\Anaconda3\Scripts\conda-server.exe conda-skeleton: C:\Users\Svidro\Anaconda3\Scripts\conda-skeleton.exe conda-verify: C:\Users\Svidro\Anaconda3\Scripts\conda-verify.exe user site dirs:

CIO_TEST: CONDA_DEFAULT_ENV: C:\Users\Svidro\Anaconda3 CONDA_ENVS_PATH: CONDA_PREFIX: C:\Users\Svidro\Anaconda3 CONDA_PS1_BACKUP: $P$G CONDA_ROOT: C:\Users\Svidro\Anaconda3