pmus pmus - 7 months ago 322
Python Question

PyInstaller doesn't import Queue

I'm trying to compile some script with twisted and Queue.

pyinstaller sample.py --onefile




# -*- coding: utf-8 -*-#
from twisted import *
import queue as Queue
a = Queue.Queue()


Unfortunately, produced file fails with
ImportError: No module named queue
.

Answer
pip install twisted --upgrade

fixed everything.

update

also don't forget to use --hidden-import=queue in cmdline.