Appleシリコン搭載MacのDocker環境でTensorflowを使う


press
Appleシリコン搭載MacのDocker環境でTensorflowを使う

Appleシリコン搭載MacのDocker環境でTensorflowを使う

Intel搭載のMacで作成したTensorflowを使ったプロジェクトを移して、M1やM2などのAppleシリコンを搭載しているMacでTensorflowを使おうとするとエラーになって使えませんでしたが、以下のAppleの公式サイトに解決方法が載っていました。

https://developer.apple.com/metal/tensorflow-plugin/

tensorflowではなくtensorflow-macosをインストールするようです。

pip install tensorflow-macos

以下のエラーが表示されましたが、numpyのバージョンを下げるとエラーが表示されなくなりました。

ERROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none)
ERROR: No matching distribution found for tensorflow-macos

株式会社ファントムへのお問い合わせ

群馬県でPythonを使ったAIやソフトウェアを開発している株式会社ファントムが運営しています。




    Related Articles

    AWS

    Pythonのコマンドラインで特定の関数のみを指定して実行する

    Pythonのコマンドラインで特定の関数のみを指定して実行する AWS Lambdaではプログラム実行時に関数を指定しますが、pythonコマンドは通常、ファイル単位で指定するのでそのままでは実行できません。そのためロー […]

    Posted on by press
    Python

    UnicodeEncodeError: ‘ascii’ codec can’t encode

    UnicodeEncodeError: ‘ascii’ codec can’t encode Pythonのprint() 関数で文字列を出力する時に以下の様なUnicodeEncod […]

    Posted on by press