
実現したいこと
pythonでtensorflowをインストールしたいです。
何がインストールできない原因なのかご意見いただきたいです。
必要な情報等ありましたら、言ってくださるとありがたいです。よろしくお願いいたします。
前提
OS : Mac OS version 11.7.4
python version : 3.10.5
pip version : 23.3.1
keras version : 2.15.0
発生している問題・エラーメッセージ
Collecting tensorflow Using cached tensorflow-2.14.0-cp310-cp310-macosx_10_15_x86_64.whl.metadata (3.9 kB) Collecting absl-py>=1.0.0 (from tensorflow) Using cached absl_py-2.0.0-py3-none-any.whl.metadata (2.3 kB) Collecting astunparse>=1.6.0 (from tensorflow) Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB) Collecting flatbuffers>=23.5.26 (from tensorflow) Using cached flatbuffers-23.5.26-py2.py3-none-any.whl.metadata (850 bytes) Collecting gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 (from tensorflow) Using cached gast-0.5.4-py3-none-any.whl (19 kB) Collecting google-pasta>=0.1.1 (from tensorflow) Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB) Collecting h5py>=2.9.0 (from tensorflow) Using cached h5py-3.10.0-cp310-cp310-macosx_10_9_x86_64.whl.metadata (2.5 kB) Collecting libclang>=13.0.0 (from tensorflow) Using cached libclang-16.0.6-py2.py3-none-macosx_10_9_x86_64.whl.metadata (5.2 kB) Collecting ml-dtypes==0.2.0 (from tensorflow) Using cached ml_dtypes-0.2.0-cp310-cp310-macosx_10_9_universal2.whl.metadata (20 kB) Collecting numpy>=1.23.5 (from tensorflow) Using cached numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl.metadata (61 kB) Collecting opt-einsum>=2.3.2 (from tensorflow) Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB) Requirement already satisfied: packaging in ./.pyenv/versions/3.10.5/lib/python3.10/site-packages (from tensorflow) (21.3) Collecting protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 (from tensorflow) Using cached protobuf-4.25.0-cp37-abi3-macosx_10_9_universal2.whl.metadata (541 bytes) Requirement already satisfied: setuptools in ./.pyenv/versions/3.10.5/lib/python3.10/site-packages (from tensorflow) (58.1.0) Requirement already satisfied: six>=1.12.0 in ./.pyenv/versions/3.10.5/lib/python3.10/site-packages (from tensorflow) (1.16.0) Collecting termcolor>=1.1.0 (from tensorflow) Using cached termcolor-2.3.0-py3-none-any.whl (6.9 kB) Collecting typing-extensions>=3.6.6 (from tensorflow) Using cached typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB) Collecting wrapt<1.15,>=1.11.0 (from tensorflow) Using cached wrapt-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl (35 kB) Collecting tensorflow-io-gcs-filesystem>=0.23.1 (from tensorflow) Using cached tensorflow_io_gcs_filesystem-0.34.0-cp310-cp310-macosx_10_14_x86_64.whl.metadata (14 kB) Collecting grpcio<2.0,>=1.24.3 (from tensorflow) Using cached grpcio-1.59.2.tar.gz (24.8 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [10 lines of output] Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/private/var/folders/md/0rrzbk_j7n71ft_6v9b_s2nm0000gn/T/pip-install-cwyu6oga/grpcio_414d29c50e284e1f9933ce1021ef6645/setup.py", line 95, in <module> import commands File "/private/var/folders/md/0rrzbk_j7n71ft_6v9b_s2nm0000gn/T/pip-install-cwyu6oga/grpcio_414d29c50e284e1f9933ce1021ef6645/src/python/grpcio/commands.py", line 31, in <module> import support File "/private/var/folders/md/0rrzbk_j7n71ft_6v9b_s2nm0000gn/T/pip-install-cwyu6oga/grpcio_414d29c50e284e1f9933ce1021ef6645/src/python/grpcio/support.py", line 111, in <module> errors.CompileError: diagnose_compile_error, AttributeError: module 'setuptools.errors' has no attribute 'CompileError' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
該当のソースコード
Python
1pip install tensorflow
試したこと
調べたところpythonのバージョンが新し過ぎても問題という記載も見られたため、対応表を調べたところ次のサイトを見つけました。
https://tecsingularity.com/cuda/version-2/
しかし、自分のpythonのバージョンも対応していそうで原因はよくわかりません。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。


回答1件
あなたの回答
tips
プレビュー