環境はubuntu18.04、python3.7(anaconda3)です。
hdf5のファイルをpythonで処理したいのですが
ModuleNotFoundError: No module named 'h5py'
とでてしまいます。
回したいコードは以下の通りです
python
1import h5py 2import numpy as np 3import matplotlib.pyplot as plt 4kekka= [] 5for b in range (0,20000,100): 6 hdf5 = h5py.File("C:/home/user/file_output/file_%d.hdf5"%(b), 'r') 7 list_x=(hdf5["particles/fluid/arrays/x"].value.tolist()) 8 list_y=(hdf5["particles/fluid/arrays/y"].value.tolist()) 9 list_z=(hdf5["particles/fluid/arrays/z"].value.tolist()) 10 list_p=(hdf5["particles/fluid/arrays/p"].value.tolist()) 11(以下省略)
これでh5pyがないとされて
pip install h5py
をしても
Requirement already satisfied: h5py in ./anaconda3/lib/python3.7/site-packages (2.8.0) Requirement already satisfied: numpy>=1.7 in ./anaconda3/lib/python3.7/site-packages (from h5py) (1.15.4) Requirement already satisfied: six in ./anaconda3/lib/python3.7/site-packages (from h5py) (1.11.0)
とされすでにはいっているとのことです。
なぜh5pyがないと出るのでしょうか?
追記
いま気づきましたがanaconda3はpython3.7ですがspyderはなぜかpython3.6となっていました
回答2件
あなたの回答
tips
プレビュー