无法加载 tls-client-64.dll 的 dynlib/dll

问题描述 投票:0回答:1
FileNotFoundError: Could not find module 'C:\Users\garfi\AppData\Local\Temp\_MEI200362\tls_client\dependencies\tls-client-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "main.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "tls_client\__init__.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "tls_client\sessions.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "tls_client\cffi.py", line 20, in <module>
  File "ctypes\__init__.py", line 452, in LoadLibrary
  File "PyInstaller\loader\pyimod03_ctypes.py", line 55, in __init__
pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll 'C:\\Users\\garfi\\AppData\\Local\\Temp\\_MEI200362\\tls_client/dependencies/tls-client-64.dll'. Most likely this dynlib/dll was not found when the application was frozen.
[4520] Failed to execute script 'main' due to unhandled exception!

我怎样才能做到这一点? stackoverflow 上的答案都没有帮助,所以我来这里寻求修复。 pyinstaller 会发生这种情况,每当我尝试使用 auto-py-to-exe、py2exe 或任何其他 python 到可执行脚本冻结它时,都会弹出此错误或缺少不同的 dll。 我如何确保所有 dll 都可用? 这是我的进口清单: 导入淡入淡出 导入请求 进口再 导入系统 导入时间 导入 aiohttp 导入 json 导入whois 导入bs4 导入并发期货 导入日期时间 导入tls_client 导入函数工具 导入pystyle 导入线程 导入 urllib3 导入SSL 导入打字 导入子流程 导入日志记录 导入二维码

python pyinstaller
1个回答
0
投票

您可能想查看 TLS 客户端 github 存储库,网址为 Python TLS 客户端

有说明https://github.com/FlorianREGAZ/Python-Tls-Client?tab=readme-ov-file#pyinstaller--pyarmor

© www.soinside.com 2019 - 2024. All rights reserved.