当运行包含pytables的代码时,我得到以下错误:
Traceback (most recent call last):
File "C:\Users\pierr\python354\lib\site-packages\pandas\io\pytables.py", line 469, in __init__
import tables # noqa
File "C:\Users\pierr\python354\lib\site-packages\tables\__init__.py", line 90, in <module>
from .utilsextension import (
ImportError: DLL load failed: The specified procedure could not be found.
...
File "C:\Users\pierr\python354\lib\site-packages\pandas\io\pytables.py", line 472, in __init__
'importing'.format(ex=str(ex)))
ImportError: HDFStore requires PyTables, "DLL load failed: The specified procedure could not be found." problem importingpython版本3.5.4 | tables版本3.4.2 | windows 10
发布于 2020-12-06 06:36:58
我也遇到过类似的问题。当我尝试运行以下代码时:
import pandas as pd
df = pd.read_hdf('some.hdf')我得到一个错误:
ImportError: Missing optional dependency 'tables'. Use pip or conda to install tables.即使同时使用conda和pip (使用last,当然是tables)安装了pytables模块,错误仍然存在。import tables也不能工作:
from .utilsextension import (
ImportError: DLL load failed: Не найден указанный модуль."Не найден указанный модуль"在俄语中的意思是"The specified module was not found"。
我爬到回溯的最后一个模块所在的文件夹-- '~\AppData\Roaming\Python\Lib\site-packages\tables‘,在那里找到了一个名为utilsextension.cp37-win_amd64.pyd的文件。然后,我下载了Dependency Walker实用程序并查看了这个文件。程序说它找不到pytables_hdf5.dll。我在文件夹~\AppData\Roaming\Python\Lib\site-packages\tables\中找到了这个文件,并通过以下方式将其添加到PATH变量:
os.environ['PATH'] += os.pathsep + os.path.expanduser('~\\AppData\\Roaming\\Python\\Lib\\site-packages\\tables')在一切正常之后,import tables和pd.read_hdf不再返回错误。希望这对某些人有用。
发布于 2019-08-11 06:18:54
使用these installation instructions安装PyTables帮助我解决了这个问题。我使用了Conda选项。
发布于 2021-11-24 04:56:36
我也有同样的问题。在我卸载并重新安装pytables之后,它就消失了。
conda remove -n MYENVNAME pytables
conda config --add channels conda-forge
conda install pytableshttps://stackoverflow.com/questions/56270677
复制相似问题