I've recently encountered this annoying error. Whenever I'd try to convert a .py to .exe with pyinstaller, this error would come up: ImportError: cannot import name 'MethodType'
In random.py there is that import:
from types import MethodType as _MethodType, BuiltinMethodType as _BuiltinMethodType
However, I can import random and types without any trouble. I've even reinstalled pyinstaller, but the problem remains.
Aucun commentaire:
Enregistrer un commentaire