ipatov_dn
@ipatov_dn

Скомпилированый скрипт с помощью pyinstaller не работает?

с помощью PyInstaller 3.2. собрал .ехе при запуске выдает ошибку:

Traceback (most recent call last):
  File "site-packages\requests\packages\__init__.py", line 27, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\packages\urllib3\__init__.py", line 8, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 28, in <module>
  File "site-packages\requests\packages\urllib3\packages\six.py", line 92, in __get__
  File "site-packages\requests\packages\urllib3\packages\six.py", line 115, in _resolve
  File "site-packages\requests\packages\urllib3\packages\six.py", line 82, in _import_module
ImportError: No module named 'queue'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "port.py", line 1, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\__init__.py", line 63, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\utils.py", line 24, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\_internal_utils.py", line 11, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\compat.py", line 11, in <module>
  File "c:\python35\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\requests\packages\__init__.py", line 29, in <module>
ImportError: No module named 'urllib3'
Failed to execute script port


как решить проблемму гугл не помог, у меня простенький скрипт с requests
  • Вопрос задан
  • 365 просмотров
Решения вопроса 1
  • @GeneD88
    QA
    from selenium import webdriver
    from selenium.webdriver import DesiredCapabilities
    from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
    
    binary = FirefoxBinary('C:\..\Firefox.exe')
    
    firefox_capabilities = DesiredCapabilities.FIREFOX
    firefox_capabilities['marionette'] = False
    
    dr= webdriver.Firefox(firefox_binary=binary)
    
    dr.get('https://directum.adm.yar.ru/Login.aspx')


    python 3.5 selenium 3.0.2 firefox 46
    Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

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

Войти через TM ID
Похожие вопросы
Вакансии с Моего Круга Все вакансии
Заказы с Фрилансим Все заказы