Skip to content
Advertisement

Why is there no module named queue in PyPy?

I need to use PyPy because speed is of the essence. I want to use priority queue and normally with Python I’d use queue module but PyPy gives me an error.

import queue

error:

import queue
ImportError: No module named queue

Why is this module not available? I thought that PyPy is compatible with Python’s standard library.

Advertisement

Answer

Thanks to @user2357112supportsMonica I have the solution. Just use heapq.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement