0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ubuntu 20.04 に TensorFlow 2.5.0 と jupyterlab をインストール

Last updated at Posted at 2024-08-02

はじめに

TensorFlow 2.5.0 をどうしてもインストールしないといけない状況で、jupyterlabもインストールしたらエラーが出たので、記録しておきます。

インストール

CUDA 11.2 CUDNN 8.1 で構築していて、venvの仮想環境にpipを使用して普通にインストールします。

$ pip install tensorflow==2.5.0

別にエラーも出ずに終わりました。続いて jupyterlab をインストールします。

$ pip install jupyterlab

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.5.0 requires typing-extensions~=3.7.4, but you have typing-extensions 4.12.2 which is incompatible.

TensorFlow 2.5.0 に対して typing-extensions のバージョンが高すぎるようです。

$ pip install -U typing-extensions==3.7.4.3

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
anyio 4.4.0 requires typing-extensions>=4.1; python_version < "3.11", but you have typing-extensions 3.7.4.3 which is incompatible.
async-lru 2.0.4 requires typing-extensions>=4.0.0; python_version < "3.11", but you have typing-extensions 3.7.4.3 which is incompatible.

今度は anyio と async-lru が文句を言ってますね。。。

$ pip install -U anyio==4.1.0 typing-extensions==3.7.4.3

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
async-lru 2.0.4 requires typing-extensions>=4.0.0; python_version < "3.11", but you have typing-extensions 3.7.4.3 which is incompatible.

$ pip install -U anyio==4.1.0 async-lru==1.0.3 typing-extensions==3.7.4.3

Installing collected packages: async-lru
  Attempting uninstall: async-lru
    Found existing installation: async-lru 2.0.4
    Uninstalling async-lru-2.0.4:
      Successfully uninstalled async-lru-2.0.4
Successfully installed async-lru-1.0.3

バージョンを落としていきながら調整してなんとか入りました。

$ pip check
No broken requirements found.
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?