基于 Python 3.9 的软件不适用于 Windows 7

Software based on Python 3.9 is not working on Windows 7

我使用 python3.9 制作了一个独立软件,它可以在我的系统和另一个 windows 10 系统上正常运行,但我尝试了 运行在 Windows 7 Ultimate 上安装该软件,它显示了一些错误。 请注意,我通过使用 PyInstaller 绑定所有必需的 python 模块来制作软件。 这些错误如下:

  1. 加载错误 Python DLL 'C:\Users\hp\AppData\Local\Temp_MEI19602\python39.dll'。 LoadLibrary: 找不到指定的模块。
  2. 程序无法启动,因为您的计算机缺少 api-ms-win-core-path-l1-1-0.dll .尝试 重新安装程序以解决此问题。

运行 这个程序在 Windows 7 上可以做什么?

如果您查看 Python 文档,您会发现 Python 3.9 在 Windows 7:

上不受支持

As specified in PEP 11, a Python release only supports a Windows platform while Microsoft considers the platform under extended support. This means that Python 3.9 supports Windows 8.1 and newer. If you require Windows 7 support, please install Python 3.8.

您可以阅读更多内容here

时代已经到来,也许您应该学习如何从源代码构建:

讨论: https://www.reddit.com/r/Python/comments/rbhd2n/python_39_310_on_windows_7/

两种解决方案都使用 Wine 项目中的代码来模拟 Windows 7 上缺少的函数(PathCchCanonicalizeEx、PathCchCombineEx、PathCchSkipRoot)。

PS:

围绕 api-ms-win-core-path-l1-1-0.dll 的错误基本上需要安装特定的 vcredist_x86.exe/vcredist_x64.exe。但具体来说 Python 3.9 中的错误是因为 DLL 是 windows 8.

的一部分