Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad message when %pylab fails due import *other* than matplotlib #3684

Closed
ivanov opened this issue Jul 18, 2013 · 8 comments · Fixed by #3683
Closed

bad message when %pylab fails due import *other* than matplotlib #3684

ivanov opened this issue Jul 18, 2013 · 8 comments · Fixed by #3683
Milestone

Comments

@ivanov
Copy link
Member

ivanov commented Jul 18, 2013

this is just to capture an issue that was sent to IPython-User by
@michaelaye:

I know you guys are busy getting a release on 1.0 done, so here's some
feedback trying to use git master:

In version
rel-0.13-3590-gadb77e3
matplotlib is not found, even so it is importable, so when using pylab
mode I get an error message:

Python 2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 12 2012, 11:14:05)
Type "copyright", "credits" or "license" for more information.

IPython 1.0.dev -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: import matplotlib

In [2]: pylab
ERROR: pylab mode doesn't work as matplotlib could not be found.
Is it installed on the system?

And since version ((rel-0.13-3681-g123ae5a)) up to now I get an import
error for the sip module (using --pylab=qt)

ImportError: No module named sip

Michael

@ivanov
Copy link
Member Author

ivanov commented Jul 18, 2013

can you try using a different gui backend ( --pylab=tk for example ) .

I remember running into an issue like this one and having to set the export QT_API="pyside" or export QT_API="pyqt" depending on which version of Qt was installed...

@michaelaye
Copy link
Contributor

I'm sorry, this might be due to problems on my system, brew does not install sip currently on my system, and was since corked. Sorry for the noise and let's close this for now.

@michaelaye
Copy link
Contributor

yeah, --pylab=tk works fine.

@michaelaye
Copy link
Contributor

as a warning to other EPD users: the config files provided in the path by the EPD path indeed blocked my brew install of sip. Had to take out EPD from the path, do brew install sip and reactivate the EPD path. Now that I have everything (=sip and pyqt updated) running again, there's no prob with IPython master. Sorry again.

@minrk
Copy link
Member

minrk commented Jul 18, 2013

I don't think it's pylab mode that's broken, it's that sip (PyQt) is actually at fault, but we turn any ImportError into the message you were discussing. Can you try PR #3683, which touches exactly this code, and see if it behaves better for you?

@michaelaye
Copy link
Contributor

As I said, all my errors are gone since sip is back in play.

@minrk
Copy link
Member

minrk commented Jul 18, 2013

Sorry. I think the ImportError swallowing the real error and telling you matplotlib is unavailable is actually fixed by that PR.

@ivanov
Copy link
Member Author

ivanov commented Jul 18, 2013

closing this, as Michael was able to resolve this issue

@ivanov ivanov closed this as completed Jul 18, 2013
minrk added a commit that referenced this issue Jul 20, 2013
use `%matplotlib` in example notebooks

- removes any mention of `%pylab` in our examples
- adds `--matplotlib` command-line flag, mapping to the new
- adds `Populated namespace` message to %pylab output, at the request of @fperez.
- fix unicode bug in SVG, discovered during testing

closes #3680
closes #3684
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
use `%matplotlib` in example notebooks

- removes any mention of `%pylab` in our examples
- adds `--matplotlib` command-line flag, mapping to the new
- adds `Populated namespace` message to %pylab output, at the request of @fperez.
- fix unicode bug in SVG, discovered during testing

closes ipython#3680
closes ipython#3684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants