【问题标题】:How to fix DLL Load failed in visual studio code?如何修复 Visual Studio 代码中的 DLL 加载失败?
【发布时间】:2021-02-28 18:00:41
【问题描述】:

当我尝试导入 pygame 时,我遇到了一个错误。

Visual Studio 代码显示的错误如下:

from pygame.base import * # pylint: disable=wildcard-import; lgtm[py/polluting-import]
Import error: DLL load failed while importing base: The specified procedure could not be found

附加信息: 我已经安装了pywin32和pypiwin32

python 3.9 版

visual studio 代码版本-1.51

【问题讨论】:

    标签: python python-3.x visual-studio visual-studio-code


    【解决方案1】:

    请检查您当前使用的 Python 是否与安装的 pygame 相同(均为 64 位或 32 位)。

    建议在python3.9环境下重新安装模块“pygame”:pip3 install pygame==2.0.0 python==3.9

    我用的是python3.9(64)、pygame2.0.0:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-09
      • 2020-04-07
      • 1970-01-01
      相关资源
      最近更新 更多