1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tensorflowのインストール

Last updated at Posted at 2019-12-29

tensorflowのインストール

tensorflowのインストールはpythonのバージョンとtensorflowのバージョンが適合することが必要になる。
(anacondaを使用すると楽だが、ここでは直で入れる場合とする)

今回Ubuntu18.04.3にpython3.6.9が入っていた。

https://qiita.com/yasushi00/items/3e5a299b0a6a808e4af3
このサイトによると、python3.6.9に適合するtensorflowのバージョンは2.0.0とあったので、以下を実行。

pip3 install tensorflow==2.0.0

※pipではなくpip3でやらないとダメだった。
すると下記のようなメッセージが出た。

Collecting tensorflow==2.0.0
Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow==2.0.0

そのため、下記を実行

pip3 install tensorflow==2.0.0a0

インストールが実行された。

pip3 list

でバージョンを確認すると
tensorflow (2.0.0a0)
と表示されたのでこれでOK。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?