質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Q&A

解決済

1回答

4457閲覧

h5pyのインストールができない

summersault

総合スコア1

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

0グッド

0クリップ

投稿2022/03/18 06:46

編集2022/03/18 09:40

h5pyのインストールがうまくいかない

環境は

macOS Monterey 12.0
チップ Apple M1 Pro

で仮想環境にpython3.8を入れて使っています。(素人なので必要な情報が書き切れているかわかりません、じゃんじゃん聞いてください)

jupyter notebook上で

python

1!pip install h5py

とインストールしようとすると

python

1Collecting h5py 2 Using cached h5py-3.6.0.tar.gz (384 kB) 3 Installing build dependencies ... done 4 Getting requirements to build wheel ... done 5 Preparing metadata (pyproject.toml) ... done 6Requirement already satisfied: numpy>=1.14.5 in ./-name-/lib/python3.8/site-packages (from h5py) (1.22.0) 7Building wheels for collected packages: h5py 8 Building wheel for h5py (pyproject.toml) ... error 9 error: subprocess-exited-with-error 10 11 × Building wheel for h5py (pyproject.toml) did not run successfully. 12 │ exit code: 1 13 ╰─> [71 lines of output] 14 running bdist_wheel 15 running build 16 running build_py 17 creating build 18 creating build/lib.macosx-10.14-arm64-3.8 19 creating build/lib.macosx-10.14-arm64-3.8/h5py 20 copying h5py/h5py_warnings.py -> build/lib.macosx-10.14-arm64-3.8/h5py 21 copying h5py/version.py -> build/lib.macosx-10.14-arm64-3.8/h5py 22 copying h5py/__init__.py -> build/lib.macosx-10.14-arm64-3.8/h5py 23 copying h5py/ipy_completer.py -> build/lib.macosx-10.14-arm64-3.8/h5py 24 creating build/lib.macosx-10.14-arm64-3.8/h5py/_hl 25 copying h5py/_hl/files.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 26 copying h5py/_hl/compat.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 27 copying h5py/_hl/__init__.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 28 copying h5py/_hl/selections.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 29 copying h5py/_hl/dataset.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 30 copying h5py/_hl/vds.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 31 copying h5py/_hl/selections2.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 32 copying h5py/_hl/group.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 33 copying h5py/_hl/datatype.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 34 copying h5py/_hl/attrs.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 35 copying h5py/_hl/dims.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 36 copying h5py/_hl/base.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 37 copying h5py/_hl/filters.py -> build/lib.macosx-10.14-arm64-3.8/h5py/_hl 38 creating build/lib.macosx-10.14-arm64-3.8/h5py/tests 39 copying h5py/tests/test_dimension_scales.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 40 copying h5py/tests/test_attribute_create.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 41 copying h5py/tests/test_file_image.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 42 copying h5py/tests/conftest.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 43 copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 44 copying h5py/tests/test_h5f.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 45 copying h5py/tests/test_dataset_getitem.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 46 copying h5py/tests/test_group.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 47 copying h5py/tests/test_errors.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 48 copying h5py/tests/test_dataset_swmr.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 49 copying h5py/tests/test_slicing.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 50 copying h5py/tests/test_h5pl.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 51 copying h5py/tests/test_attrs.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 52 copying h5py/tests/__init__.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 53 copying h5py/tests/test_attrs_data.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 54 copying h5py/tests/test_h5t.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 55 copying h5py/tests/test_big_endian_file.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 56 copying h5py/tests/test_h5p.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 57 copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 58 copying h5py/tests/test_h5o.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 59 copying h5py/tests/test_datatype.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 60 copying h5py/tests/common.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 61 copying h5py/tests/test_dataset.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 62 copying h5py/tests/test_file.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 63 copying h5py/tests/test_selections.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 64 copying h5py/tests/test_dtype.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 65 copying h5py/tests/test_h5.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 66 copying h5py/tests/test_file2.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 67 copying h5py/tests/test_completions.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 68 copying h5py/tests/test_filters.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 69 copying h5py/tests/test_base.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 70 copying h5py/tests/test_objects.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests 71 creating build/lib.macosx-10.14-arm64-3.8/h5py/tests/data_files 72 copying h5py/tests/data_files/__init__.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/data_files 73 creating build/lib.macosx-10.14-arm64-3.8/h5py/tests/test_vds 74 copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/test_vds 75 copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/test_vds 76 copying h5py/tests/test_vds/__init__.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/test_vds 77 copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/test_vds 78 copying h5py/tests/data_files/vlen_string_s390x.h5 -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/data_files 79 copying h5py/tests/data_files/vlen_string_dset_utc.h5 -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/data_files 80 copying h5py/tests/data_files/vlen_string_dset.h5 -> build/lib.macosx-10.14-arm64-3.8/h5py/tests/data_files 81 running build_ext 82 Loading library to get build settings and version: libhdf5.dylib 83 error: Unable to load dependency HDF5, make sure HDF5 is installed properly 84 error: dlopen(libhdf5.dylib, 0x0006): tried: 'libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file), '/private/var/folders/1q/nfss2b5j4jbf_68hk44rlm5c0000gn/T/pip-install-ay2x7p1p/h5py_e20133e0a59b44b693f20454891be17c/libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file) 85 [end of output] 86 87 note: This error originates from a subprocess, and is likely not a problem with pip. 88 ERROR: Failed building wheel for h5py 89Failed to build h5py 90ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects 91

とエラーが吐かれてしまいます。すでに

python

1!brew install hdf5

としてhdf5は入っているのですが、うまく機能してくれていないようです。
丸投げで申し訳ないのですが、どうすれば改善できるのでしょうか...。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

summersault

2022/03/18 08:38

実行してみたら、また違うエラーが出てきてしまいました。 新たなエラーについてはネット上で全く同じものがいくつか質問で出ていますが、具体的な解答はどこでも得られませんでした...。改善が難しいんですかね? 質問内容を編集します、ありがとうございます!
jbpb0

2022/03/18 22:45

> '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file), '/private/var/folders/1q/nfss2b5j4jbf_68hk44rlm5c0000gn/T/pip-install-ay2x7p1p/h5py_e20133e0a59b44b693f20454891be17c/libhdf5.dylib' (no such file), '/usr/local/lib/libhdf5.dylib' (no such file), '/usr/lib/libhdf5.dylib' (no such file) 上記を探したけど見つからない、とのこと > !brew install hdf5 としてhdf5は入っている それでしたら、「libhdf5.dylib」というファイル名のファイルがどこかにインストールされてると思いますので、探してみてください https://teratail.com/questions/dqwx08mvbephn0 のtechnocoreさんの回答も参考になります (ファイル名は違いますが)
quickquip

2022/03/18 23:48

Intelバイナリを使った方が手っ取り早いのでは……と思いました
jbpb0

2022/03/19 08:41 編集

> 質問内容を編集します もともとの質問内容(error: pkg-config probably not installed)を残して、それに新たに分かったこと(error: Unable to load dependency HDF5)を追記してください
summersault

2022/03/27 01:16

サーチの入るところにファイルを置き、さらにエラーが深くなっていってしまったので、仕方なく古いintelのPCで動かすことにしました泣 ご協力ありがとうございました!
quickquip

2022/03/27 01:20

"Intelバイナリを使った方が"は、Rosetta2を有効にしたら、という意味でした。どのみちPython環境は全部作り直しですが。
summersault

2022/04/04 09:41 編集

h5py素直にはいりました... rosetta2知らなかったです、本当にありがとうございます泣
guest

回答1

0

ベストアンサー

以下は、質問を修正する前の、もともとの質問内容に対する回答です

error: pkg-config probably not installed: FileNotFoundError(2, 'No such file or directory')

下記を実行してみてください

python

1!brew install pkg-config

参考
OS X El Capitan に matplotlib をインストールする
kerasのインストールができません。

投稿2022/03/20 11:48

jbpb0

総合スコア7653

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問