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

Python 3.4 tkagg backend error while importing pyplot #3093

Closed
tobias47n9e opened this issue May 28, 2014 · 7 comments
Closed

Python 3.4 tkagg backend error while importing pyplot #3093

tobias47n9e opened this issue May 28, 2014 · 7 comments

Comments

@tobias47n9e
Copy link
Contributor

Python 3.4.0 currently gives me the following error when importing pyplot (I am using the Ubuntu daily build of matplotlib: https://launchpad.net/~takluyver/+archive/matplotlib-daily). I couldn't fix it using pip3 (http://stackoverflow.com/questions/13110403/matplotlib-backend-missing-modules-with-underscore). There is also this: pism/regional-tools#3

>>> from matplotlib.pyplot import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 103, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/usr/lib/python3/dist-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_tkagg.py", line 13, in <module>
    import matplotlib.backends.tkagg as tkagg
  File "/usr/lib/python3/dist-packages/matplotlib/backends/tkagg.py", line 7, in <module>
    from matplotlib.backends import _tkagg
ImportError: cannot import name '_tkagg'
@tacaswell
Copy link
Member

@takluyver Can you take a look at this? My interpretation of that error is that the installation/build is borked as there is a missing c-extension.

@takluyver
Copy link
Contributor

I've copied a couple of Tk-related changes across from Ubuntu's packaging; hopefully it will be fixed when it next builds.

@tobias47n9e
Copy link
Contributor Author

The build python3-matplotlib 1.4.0~1+7018+28~ubuntu14.04.1 still gives the same error. I will check again tomorrow.

@takluyver
Copy link
Contributor

That was the build before I changed anything. I made a silly mistake and it failed to build - I've kicked off a new build, so fingers crossed it will work this time.

@takluyver
Copy link
Contributor

OK, the build has succeeded now, and I see _tkagg.so in the build log - can you give it a try?

@tobias47n9e
Copy link
Contributor Author

Everything works again. Perfect. Thank you!

@tacaswell
Copy link
Member

Great! Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants