I am using python 3.4. I am able to run my python script without any problem.
But While running my freezed python script , following error have appeared.
I am able to freeze my script successfully too with cx_freeze.
C:Program Files (x86)utils>utils.exe
Traceback (most recent call last):
File "C:Python34libsite-packages
equestspackages\__init__.py", line 27, i
n <module>
from . import urllib3
File "C:Python34libsite-packages
equestspackagesurllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:Python34libsite-packages
equestspackagesurllib3connectionpool.py", line 28, in <module>
from .packages.six.moves.queue import LifoQueue, Empty, Full
File "C:Python34libsite-packages
equestspackagesurllib3packagessix.py", line 203, in load_module
mod = mod._resolve()
File "C:Python34libsite-packages
equestspackagesurllib3packagessix.py", line 115, in _resolve
return _import_module(self.mod)
File "C:Python34libsite-packages
equestspackagesurllib3packagessix.py", line 82, in _import_module
__import__(name)
ImportError: No module named 'queue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:Python34libsite-packagescx_Freezeinitscripts\__startup__.py", line 12, in <module>
__import__(name + "__init__")
File "C:Python34libsite-packagescx_FreezeinitscriptsConsole.py", line 21, in <module>
scriptModule = __import__(moduleName)
File "utils.py", line 3, in <module>
File "C:Python34libsite-packages
equests\__init__.py", line 63, in <module>
from . import utils
File "C:Python34libsite-packages
equestsutils.py", line 24, in <module>
from ._internal_utils import to_native_string
File "C:Python34libsite-packages
equests\_internal_utils.py", line 11, in <module>
from .compat import is_py2, builtin_str
File "C:Python34libsite-packages
equestscompat.py", line 11, in <module>
from .packages import chardet
File "C:Python34libsite-packages
equestspackages\__init__.py", line 29, in <module>
import urllib3
File "C:Python34libsite-packagesurllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:Python34libsite-packagesurllib3connectionpool.py", line 28, in <module>
from .packages.six.moves.queue import LifoQueue, Empty, Full
File "C:Python34libsite-packagesurllib3packagessix.py", line 203, in load_module
mod = mod._resolve()
File "C:Python34libsite-packagesurllib3packagessix.py", line 115, in _resolve
return _import_module(self.mod)
File "C:Python34libsite-packagesurllib3packagessix.py", line 82, in _import_module
__import__(name)
ImportError: No module named 'queue'
Even tried installing package 'six' with no help.
My setup.py is
from cx_Freeze import setup, Executable
import requests.certs
setup(
name = "utils" ,
version = "0.1" ,
description = " utils for accounts" ,
executables = [Executable("utils.py")],
options = {"build_exe": {"packages": ["urllib", "requests"],"include_files":[(requests.certs.where(),'cacert.pem')]}},
)
script imports following module
import requests
import urllib.request
import uuid
import json
import http.client
from xml.dom import minidom
Any help will be highly appreciated. please see me as novice in python
See Question&Answers more detail:
os