You appear to have a Python version issue:
Bleasel wrote:Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
This is a very old Python and shouldn't be on more recent macOS versions that are completely patched with Apple updates.
Bleasel wrote:Python 2.7.16 (default, Mar 25 2021, 18:52:10)
I believe that in 2.7.16, the
Queue module has at least been aliased to
queue since I can import queue on all 2.7.16 instances I have on my various devices. It's possible (maybe likely) that they did that in the later dot releases of Python 2 to help with Python 3 migration, and that earlier versions of Python 2 may not have done it. I further believe that if your OS has all it's security updates, that you likely have 2.7.16 installed unless you're on a very old OS. High Sierra and newer, for instance, has it.
Dave, if you want to support older Python versions, I'd recommend:
- Code: Select all
try:
import queue
except:
import Queue as queue
I believe that most of the module features are the same so hopefully that'll work.