web-dev-qa-db-fra.com

ERREUR: impossible de désinstaller «wrapt». lors de l'installation de tensorflow-gpu ~ = 1.14

J'essaye d'installer la version suivante de TensorFlow-GPU parce que l'auteur de gitrepo l'a suggéré ici .

[jalal@goku examples]$ pip install tensorflow-gpu~=1.14
Collecting tensorflow-gpu~=1.14
  Using cached https://files.pythonhosted.org/packages/a5/ad/933140e74973fb917a194ab814785e7c23680ca5dee6d663a509fe9579b6/tensorflow_gpu-1.15.0-cp36-cp36m-manylinux2010_x86_64.whl
Processing /home/grad3/jalal/.cache/pip/wheels/d7/de/2e/efa132238792efb6459a96e85916ef8597fcb3d2ae51590dfd/wrapt-1.11.2-cp36-cp36m-linux_x86_64.whl
Requirement already satisfied: protobuf>=3.6.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.11.0)
Requirement already satisfied: tensorflow-estimator==1.15.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.15.1)
Requirement already satisfied: six>=1.10.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.13.0)
Requirement already satisfied: wheel>=0.26 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.33.6)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.15.0)
Requirement already satisfied: termcolor>=1.1.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.1.0)
Requirement already satisfied: opt-einsum>=2.3.2 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.1.0)
Collecting keras-applications>=1.0.8
  Using cached https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl
Requirement already satisfied: keras-preprocessing>=1.0.5 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.0.5)
Requirement already satisfied: grpcio>=1.8.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.25.0)
Requirement already satisfied: absl-py>=0.7.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.1)
Requirement already satisfied: google-pasta>=0.1.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.1.8)
Processing /home/grad3/jalal/.cache/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd/gast-0.2.2-cp36-none-any.whl
Requirement already satisfied: astor>=0.6.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.0)
Requirement already satisfied: numpy<2.0,>=1.16.0 in /home/grad3/jalal/.local/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.17.4)
Requirement already satisfied: setuptools in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow-gpu~=1.14) (42.0.2)
Requirement already satisfied: markdown>=2.6.8 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (3.1.1)
Requirement already satisfied: werkzeug>=0.11.15 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (0.16.0)
Requirement already satisfied: h5py in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from keras-applications>=1.0.8->tensorflow-gpu~=1.14) (2.7.1)
Installing collected packages: wrapt, keras-applications, gast, tensorflow-gpu
  Found existing installation: wrapt 1.10.11
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Comment résoudre ce problème d'installation?

Un peu d'informations sur mon système:

$ cat /proc/version
Linux version 3.10.0-1062.4.3.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Wed Nov 13 23:58:53 UTC 2019


$ lsb_release -a
LSB Version:    :core-4.1-AMD64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.7.1908 (Core)
Release:    7.7.1908
Codename:   Core


$ python
Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 09:07:38) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
>>> import deepposekit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deepposekit/__init__.py", line 20, in <module>
    from deepposekit.io import TrainingGenerator, DataGenerator
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deepposekit/io/__init__.py", line 18, in <module>
    from deepposekit.io.BaseGenerator import BaseGenerator
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/deepposekit/io/BaseGenerator.py", line 16, in <module>
    from tensorflow.keras.utils import Sequence
ModuleNotFoundError: No module named 'tensorflow'

J'ai les GPU suivants:

$ nvidia-smi
Sat Dec  7 22:48:51 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67       Driver Version: 418.67       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:05:00.0  On |                  N/A |
|  0%   28C    P0    61W / 250W |   1462MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:06:00.0 Off |                  N/A |
|  0%   28C    P8    13W / 250W |     12MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

Et voici ma version CUDA:

$ cat /usr/local/cuda/version.txt
CUDA Version 10.0.130

$ pip list | grep tensorflow
tensorflow-estimator               1.15.1  




[jalal@goku examples]$ yum search wrapt
Loaded plugins: aliases, changelog, copr, fastestmirror, kabi, langpacks, priorities, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
Loading mirror speeds from cached hostfile
 * centos-sclo-rh: mirrors.seas.harvard.edu
 * centos-sclo-sclo: mirrors.seas.harvard.edu
 * remi-php70: mirror.pit.teraswitch.com
 * remi-php71: mirror.pit.teraswitch.com
 * remi-php73: mirror.pit.teraswitch.com
 * remi-safe: mirror.pit.teraswitch.com
 * ulyaoth: repos.ulyaoth.com
 * webtatic: us-east.repo.webtatic.com
Atom                                                                                                                                                                                                       140/140
1075 packages excluded due to repository priority protections
=============================================================================================== N/S matched: wrapt ================================================================================================
python-wrapt.x86_64 : A Python module for decorators, wrappers and monkey patching
python36-wrapt.x86_64 : A Python module for decorators, wrappers and monkey patching

  Name and summary matches only, use "search all" for everything.
[jalal@goku examples]$ Sudo yum remove python-wrapt.x86_64 
Loaded plugins: aliases, changelog, copr, fastestmirror, kabi, langpacks, priorities, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
No Match for argument: python-wrapt.x86_64
No Packages marked for removal
[jalal@goku examples]$ Sudo yum remove python36-wrapt.x86_64 
Loaded plugins: aliases, changelog, copr, fastestmirror, kabi, langpacks, priorities, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
No Match for argument: python36-wrapt.x86_64
No Packages marked for removal
3
Mona Jalal

Tout d'abord, procédez comme suit:

$ conda update wrapt

Puis,

[jalal@goku examples]$ pip install tensorflow-gpu~=1.14
Collecting tensorflow-gpu~=1.14
  Using cached https://files.pythonhosted.org/packages/a5/ad/933140e74973fb917a194ab814785e7c23680ca5dee6d663a509fe9579b6/tensorflow_gpu-1.15.0-cp36-cp36m-manylinux2010_x86_64.whl
Requirement already satisfied: numpy<2.0,>=1.16.0 in /home/grad3/jalal/.local/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.17.4)
Requirement already satisfied: google-pasta>=0.1.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.1.8)
Requirement already satisfied: wrapt>=1.11.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.11.2)
Requirement already satisfied: absl-py>=0.7.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.1)
Collecting keras-applications>=1.0.8
  Using cached https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl
Requirement already satisfied: six>=1.10.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.13.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.0.5)
Requirement already satisfied: opt-einsum>=2.3.2 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.1.0)
Requirement already satisfied: protobuf>=3.6.1 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (3.11.0)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.15.0)
Requirement already satisfied: wheel>=0.26 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.33.6)
Requirement already satisfied: termcolor>=1.1.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.1.0)
Collecting tensorflow-estimator==1.15.1
  Using cached https://files.pythonhosted.org/packages/de/62/2ee9cd74c9fa2fa450877847ba560b260f5d0fb70ee0595203082dafcc9d/tensorflow_estimator-1.15.1-py2.py3-none-any.whl
Processing /home/grad3/jalal/.cache/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd/gast-0.2.2-cp36-none-any.whl
Requirement already satisfied: astor>=0.6.0 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (0.8.0)
Requirement already satisfied: grpcio>=1.8.6 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorflow-gpu~=1.14) (1.25.0)
Requirement already satisfied: h5py in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from keras-applications>=1.0.8->tensorflow-gpu~=1.14) (2.7.1)
Requirement already satisfied: setuptools in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow-gpu~=1.14) (42.0.2.post20191201)
Requirement already satisfied: werkzeug>=0.11.15 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (0.16.0)
Requirement already satisfied: markdown>=2.6.8 in /scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow-gpu~=1.14) (3.1.1)
Installing collected packages: keras-applications, tensorflow-estimator, gast, tensorflow-gpu
  Found existing installation: Keras-Applications 1.0.6
    Uninstalling Keras-Applications-1.0.6:
      Successfully uninstalled Keras-Applications-1.0.6
  Found existing installation: gast 0.3.2
    Uninstalling gast-0.3.2:
      Successfully uninstalled gast-0.3.2
Successfully installed gast-0.2.2 keras-applications-1.0.8 tensorflow-estimator-1.15.1 tensorflow-gpu-1.15.0
3
Mona Jalal

Mettre à jour Conda et essayer d'installer à nouveau Tensorflow a fonctionné pour moi:

conda update --all
pip install tensorflow
0
Tshilidzi Mudau

Trouvez ce fichier .whl de cache dans votre /home/grad3/jalal/.cache/pip/wheels/... Retirez-le.

Puis recommencez comme la procédure d'installation normale. Ça marche pour moi.

0
sakura
pip install --upgrade pip
conda update --all
pip install tensorflow

0
Rohan Kumara