Update: ipykeynel 4.4.1 fixed this problem on the morning of August 9th.
I have a new version and I'm trying to run my python routines, namely jupyter notebook and matplotlib. I set everything up and the "import matplotlib" works. If I am in a jupyter laptop and I try to "import matplotlib.pyplot" or "from mplotlib import pyplot as plt", I get:
ImportError Traceback (most recent call last) ... /usr/local/lib/python2.7/dist-packages/IPython/core/pylabtools.pyc in configure_inline_support(shell, backend) 359 except ImportError: 360 return
Full trace
However, if I'm on ipython (command line), this works fine. In addition, graphs are executed from the module from the command line, excellent. I tried various methods:
- Package install / uninstall matplotlib, ipython and jupyter in different order
- Using pip with --no-cache-dir and / or -ignore-installed
- Removing ~ / .cache, ~ / .ipython and ~ / .jupyter
- Make sure that packages with apt-get are not installed, installed only with a peak
- Using apt-get to install python-matplotlib, ipython and python-jupyter
It looks like I was looking for some information about the path, but I canβt determine what or where it can happen, especially after deleting / reinstalling a few pip and clearing the cache. I read every SO question related to matplotlib import, none of them helped.
I went back to matplotlib 1.4.3 and it worked, but I am missing a couple of functions that I need. I understand that this is probably difficult, so if you have any ideas, even if they are incomplete, it will be very useful. Also, if this is something worthy of a bug report (never been done, not sure if this is a matplotlib problem or just locally parsed), comment as such and I will post it. Thanks!
System Information:
Linux Mint 18 "Sarah" Python==2.7.12 ipykernel==4.4.0 ipython==5.0.0 ipython-genutils==0.1.0 ipywidgets==5.2.2 jupyter==1.0.0 jupyter-client==4.3.0 jupyter-console==5.0.0 jupyter-core==4.1.0 notebook==4.2.2 numpy==1.11.1 pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
The output of sys.path in ipython and jupyter (same for both):
['', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/local/lib/python2.7/dist-packages/IPython/extensions', '/home/mm/.ipython']