gpt4 book ai didi

python - __main__.pyinstallerimporterror 无法加载 dynlib/dll "shcore"

转载 作者:行者123 更新时间:2023-12-01 00:01:37 32 4
gpt4 key购买 nike

我使用pyinstaller打包一个exe文件。

在我的电脑(Win 10)上可以正常运行。

但是在别人的电脑上(Win 7)却显示

__main__.pyinstallerimporterror failed to load dynlib/dll "shcore".

关于shcore,我用的是

import ctypes
PROCESS_PER_MONITOR_DPI_AWARE = 2
ctypes.windll.shcore.SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE)

我该怎么办?提前致谢。

最佳答案

支持的最低客户端为 SetProcessDpiAwareness是 Windows 8.1。

根据PROCESS_DPI_AWARENESS :

In previous versions of Windows, there was no setting for PROCESS_PER_MONITOR_DPI_AWARE. Apps were either DPI unaware or DPI aware. Legacy applications that were classified as DPI aware before Windows 8.1 are considered to have a PROCESS_DPI_AWARENESS setting of PROCESS_SYSTEM_DPI_AWARE in current versions of Windows.

您只能使用SetProcessDPIAware设置系统 DPI 感知

关于python - __main__.pyinstallerimporterror 无法加载 dynlib/dll "shcore",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60315287/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com