@deonnis5

Поможите решить проблему при компиляции в cx-Freeze?

Добрый день! Такая вот ерунда лезет при компиляции program.py в cx_Freeze:
Requirement already satisfied: pyinstaller in c:\program files\python35-32\lib\site-packages
Requirement already satisfied: setuptools in c:\program files\python35-32\lib\site-packages (from pyinstaller)
Requirement already satisfied: pefile in c:\program files\python35-32\lib\site-packages (from pyinstaller)
Requirement already satisfied: pypiwin32 in c:\program files\python35-32\lib\site-packages (from pyinstaller)
Requirement already satisfied: future in c:\program files\python35-32\lib\site-packages (from pefile->pyinstaller)

C:\test>pyinstaller test.py
failed to create process.

C:\test>cd build

C:\test\build>cd exe.win32-3.5

C:\test\build\exe.win32-3.5>bo
'bo' is not recognized as an internal or external command,
operable program or batch file.

C:\test\build\exe.win32-3.5>test.exe
Traceback (most recent call last):
File "C:\Program Files\Python35-32\lib\site-packages\requests\packages\__init__.py", line 39, in
from . import idna
File "C:\Program Files\Python35-32\lib\site-packages\requests\packages\idna\__init__.py", line 1, in
from .core import *
File "C:\Program Files\Python35-32\lib\site-packages\requests\packages\idna\core.py", line 1, in
from . import idnadata
ImportError: cannot import name 'idnadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Python35-32\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 12, in
__import__(name + "__init__")
File "C:\Program Files\Python35-32\lib\site-packages\cx_Freeze\initscripts\Console.py", line 24, in
exec(code, m.__dict__)
File "bot.py", line 2, in
File "C:\Program Files\Python35-32\lib\site-packages\requests\__init__.py", line 63, in
from . import utils
File "C:\Program Files\Python35-32\lib\site-packages\requests\utils.py", line 24, in
from ._internal_utils import to_native_string
File "C:\Program Files\Python35-32\lib\site-packages\requests\_internal_utils.py", line 11, in
from .compat import is_py2, builtin_str, str
File "C:\Program Files\Python35-32\lib\site-packages\requests\compat.py", line 11, in
from .packages import chardet
File "C:\Program Files\Python35-32\lib\site-packages\requests\packages\__init__.py", line 41, in
import idna
File "C:\Program Files\Python35-32\lib\site-packages\idna\__init__.py", line 1, in
from .core import *
File "C:\Program Files\Python35-32\lib\site-packages\idna\core.py", line 1, in
from . import idnadata
ImportError: cannot import name 'idnadata'

idna поставил. python 3.5.2
  • Вопрос задан
  • 1030 просмотров
Пригласить эксперта
Ответы на вопрос 1
@Xander017
"C:\Program Files\Python35-32\lib\site-packages\idna\core.py", line 1, in
from . import idnadata
ImportError: cannot import name 'idnadata'

Открой этот файл в IDLE. Если его выполнить - ругается на 1 и 6 строку.
Поправь Import в этом файле. Убери "from ." И попробуй создать свой exe.
Копию файла оставь на всякий случай до изменений.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы