使用`pytables`的時候,出現找不到`DLL`的錯誤,導致程序意外退出。

問題表現

使用pytables的時候,出現找不到DLL的錯誤,導致程序意外退出。
下面的錯誤

import tables
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm 2019.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "E:\anaconda\envs\3d\lib\site-packages\tables\__init__.py", line 93, in <module>
    from .utilsextension import (
  File "C:\Program Files\JetBrains\PyCharm 2019.2.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: 找不到指定的程序。

會導致下面的錯誤:

Process finished with exit code -1073741819 (0xC0000005)

代碼沒有任何問題,但是卻運行不下去,在import的時候就出錯了,經過一行一行import之後,終於發現是tables的鍋:

問題解決

解決方案是,用下面的命令重新安裝pytables

conda install pytables -c conda-forge

問題得以解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章