获取h5py的导入错误,但我已经安装了它。但它是在pythonshell中工作的
import numpy as np
from urllib.request import urlretrieve
import os
import h5py
if not os.path.isfile('datasets/mini.h5'):
print("Downloading Conceptnet Numberbatch word embeddings...")
conceptnet_url = 'http://conceptnet.s3.amazonaws.com/precomputed-
data/2016/numberbatch/17.06/mini.h5'
urlretrieve(conceptnet_url, 'datasets/mini.h5')
with h5py.File('datasets/mini.h5', 'r') as f:
all_words = [word.decode('utf-8') for word in f['mat']['axis1'][:]]
all_embeddings = f['mat']['block0_values'][:]
我得到的错误是:
import h5py
ImportError: DLL load failed while importing _errors: The specified module could not be found.
目前没有回答
相关问题 更多 >
编程相关推荐