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

Forcing the use of the TkAgg Matplot lib backend prevents usage in notebooks #40

Closed
philwinder opened this issue Jul 1, 2019 · 5 comments

Comments

@philwinder
Copy link

philwinder commented Jul 1, 2019

Hi there. In a few places you force the use of TkAgg. In the past this was necessary to work on certain systems, but I believe this is no longer the case with newer versions of Matplotlib.

However, forcing TkAgg breaks the code on, for example, Google Colab.

I see it was introduced in this commit: e089dd9

I think the easiest solution is to revert that commit and test again on the original system that was having issues (probably OSX).

Here is the most simple reproduction: https://colab.research.google.com/gist/philwinder/148a4a54d0a7fdc1a10677f30da2da57/untitled6.ipynb

This:

!pip install simple_rl
from simple_rl.tasks import GridWorldMDP

Thanks!

@david-abel
Copy link
Owner

Yes, indeed the TkAgg backend was being used to fix some issues on OSX. I will test taking TkAgg out, thanks!

@david-abel
Copy link
Owner

Should be fixed now, let me know if issues persist and I will reopen this issue.

@philwinder
Copy link
Author

Hi @david-abel, thanks for this.
There is another tkagg reference here: https://github.com/david-abel/simple_rl/blob/master/simple_rl/tasks/gather/GatherStateClass.py

This is imported through a chain of files to end up in the same simple_rl.tasks package, so the test above still fails.

@david-abel
Copy link
Owner

Hi Phil,

Should be fixed -- I added a condition to check for Mac OS, which is what requires TkAgg. Let me know if it persists.

Cheers,
-Dave

@jacksondc
Copy link

I'm not seeing this change on pip or in the tarball linked in the README—is it possible a new version hasn't been released this got fixed?

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