0

我在尝试运行在 python 中使用 glumpy 库的代码时遇到此错误。似乎问题出在尝试使用“app”运行命令时。我正在使用 anaconda 和 python 3.6。我很难安装 dlib 和 glumpy,我想避免在另一个环境中再次安装它们。我该怎么做才能避免出现此错误?似乎问题出在我猜的包中?

Traceback (most recent call last):
  File "C:/Users/טל קרני/PycharmProjects/untitled/graphicstry.py", line 64, in <module>
    window = app.Window(color=(1, 1, 1, 1))
  File "C:\anaconda\envs\env_dlib\lib\site-packages\glumpy\app\__init__.py", line 150, in __new__
    backend = use(name)
  File "C:\anaconda\envs\env_dlib\lib\site-packages\glumpy\app\__init__.py", line 116, in use
    importlib.import_module(name)
  File "C:\anaconda\envs\env_dlib\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\anaconda\envs\env_dlib\lib\site-packages\glumpy\app\window\backends\backend_glfw.py", line 82, in <module>
    from glumpy.ext import glfw
  File "C:\anaconda\envs\env_dlib\lib\site-packages\glumpy\ext\glfw.py", line 63, in <module>
    _glfw = ctypes.CDLL(_glfw_file)
  File "C:\anaconda\envs\env_dlib\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
4

1 回答 1

0

这几乎总是意味着您试图将 32 位 DLL 加载到 64 位进程中,反之亦然。您运行的是 64 位 Windows 吗?您是否安装了 64 位 Python?你是不是把64位的glumpy拿来了?

于 2021-01-31T06:42:08.767 回答