Closed mankyd closed 4 years ago
Actually, after some more investigation, the solution for getting it working my virtual-env was simply:
sudo apt install python3-tk
yeah, tkinter should be included in most python distributions by default, and by my understanding, if it's not, it can't be solved by pip (and thus requirements.txt).
one thing I can do is to move the tk import closer to where it is used, so it isn't imported unnecessarily. that way, most users of the library won't need it, unless they use the specific virtual display functionality.
Conditional import would be great. Maybe add a line to the readme stating that tkinter should be setup.
Seconding that a line in the readme would be nice.
On a fresh raspberry OS install (which I'm guessing is a common use case for this module?), libopen2-7
, 'libtiff-5
, and python3-dev
also needed to be installed via apt.
My preference would be to remove the dependency on tkinter
and have a separate requirements.txt
for running the tests. I don't really want to install python3-tk
and its X11 dependencies when they are only used for the tests 🙂
OK, with the changes I just merged you should not need tkinter any more unless you are running the tests. Let me know if you find any issue with the change!
If it was added to the requirements file then maybe you could paste how it looks for us to just paste ourselves.
display.py imports tkinter:
It should be added to requirements.txt