Closed nodrogluap closed 5 years ago
Hey there. Python 3 compatibility was part of my next larger update. This is however pretty damn great. I'll merge in what I can and test the compatibility.
As a note around sudo use, pip is able to install anything locally in any environment. I was assuming any user that knew how to use environments, would know this. Perhaps I should be a little more verbose about that.
Right, I use pip a lot with user install option, but underlying Tk stuff seemed to not resolve properly.
-bash-4.2$ /usr/bin/python2.7 SquigglePlot.py
Traceback (most recent call last):
File "SquigglePlot.py", line 8, in
And pip doesn’t seem to know about tkinter. Saw use of the six module, so decided to try Python 3. :-)
On Mar 18, 2019, at 5:00 PM, James Ferguson notifications@github.com<mailto:notifications@github.com> wrote:
Hey there. Python 3 compatibility was part of my next larger update. This is however pretty damn great. I'll merge in what I can and test the compatibility.
As a note around sudo use, pip is able to install anything locally in any environment. I was assuming any user that knew how to use environments, would know this. Perhaps I should be a little more verbose about that.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Psy-Fer/SquiggleKit/pull/6#issuecomment-474133799, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACPep2h21Tn1FOxeHNZKVhEZTJrOSZW0ks5vYBqVgaJpZM4b6gRw.
Should be fine with any python 2.7+ environment, and has been pretty straight forward on all machines we have been using here, laptops running windows, mac, ubuntu, as well as our CentOS server.
Do you have any more specific information around what didn't work?
It turns out that Python Tk support in CentOS 7 is a Hot Mess. Tk support is not included in the base OS python install for 2.7.5. Running with escalated privilege "yum install python27-tkinter" installed a bunch of stuff, but amazingly does not have a dependency on the base tkinter package. So you also need to run "yum install tkinter". Then it works.
Ahh. Yea Tk isn't a requirement for SquiggleKit as far as i'm aware, unless it's hidden away in matplotlib somewhere
It appears to be the default backend for matplotlib as per the traceback. You could manually override to use matplotlib.use('FooAgg') with WXAgg , GTKAgg , QT4Agg , QT5Agg, etc. but not sure that's going to be any less of a headache for some user. Nothing's universal probably?
Tk is probably still the best bet, with the caveats for CentOS 7. I was just too lazy to figure it out before. :-)
Hmm interesting. I didn't have any issues with tkinter that I remember. Looks like I need to spin up another fresh environment and see if I can sort that out.
Thanks so much for the feedback so far.
This was awesome and I took this add in just some raw error message. I'll probably clean this up in a similar way to what you have done in a refactor. I'll chuck you into my acknowledgements cause this along with my gzip iohandling was what I needed to change to make it compatible with all python.
I had trouble getting all the dependencies to work in Python 2.7, so thought I'd do a few edits to support Python 3(.7) as all the dependencies worked nicely in conda (i.e. easy install with no sudo privilege). YMMV. I think the changes work in Python 2 as well but please check as I couldn't fully test Python 2.7 functionality.