Hi,
I am trying to freeze a project that uses requests and I am having a hard
time. Maybe someone can help me?
test.py:
import requests
freezing with:
cxfreeze test.py -O -c --target-dir=dist
When I run I get:
Traceback (most recent call last):
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\__init__.py",
line 27, in <module>
from . import urllib3
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\urllib3\__init__.py",
line 8, in <module>
from .connectionpool import (
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\urllib3\connectionpool.py",
line 28, in <module>
from .packages.six.moves.queue import LifoQueue, Empty, Full
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\urllib3\packages\six.py",
line 203, in load_module
mod = mod._resolve()
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\urllib3\packages\six.py",
line 115, in _resolve
return _import_module(self.mod)
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\urllib3\packages\six.py",
line 82, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'queue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\cx_Freeze\initscripts\__startup__.py",
line 12, in <module>
__import__(name + "__init__")
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\cx_Freeze\initscripts\Console.py",
line 24, in <module>
exec(code, m.__dict__)
File "test.py", line 1, in <module>
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\__init__.py",
line 63, in <module>
from . import utils
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\utils.py", line
24, in <module>
from ._internal_utils import to_native_string
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\_internal_utils.py",
line 11, in <module>
from .compat import is_py2, builtin_str, str
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\compat.py", line
11, in <module>
from .packages import chardet
File
"C:\Users\tmc\.virtualenvs\grid\lib\site-packages\requests\packages\__init__.py",
line 29, in <module>
import urllib3
ModuleNotFoundError: No module named 'urllib3'
Has any one seen this before?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users