错误:无法卸载"wrapt".在安装tensorflow-gpu〜= 1.14时 [英] ERROR: Cannot uninstall 'wrapt'. when installing tensorflow-gpu~=1.14

查看:501
本文介绍了错误:无法卸载"wrapt".在安装tensorflow-gpu〜= 1.14时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装以下版本的TensorFlow-GPU,因为gitrepo的作者建议使用它

I am trying to install the following version of TensorFlow-GPU because the author of gitrepo has suggested it here.

[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.

如何解决此安装问题?

有关我的系统的一些信息:

A little information about my system:

$ cat /proc/version
Linux version 3.10.0-1062.4.3.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (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'

我有以下GPU:

$ 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 |
+-------------------------------+----------------------+----------------------+

这是我的CUDA版本:

And here's my CUDA version:

$ 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

推荐答案

首先,请执行以下操作:

First, do the following:

$ conda update wrapt

然后

[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

这篇关于错误:无法卸载"wrapt".在安装tensorflow-gpu〜= 1.14时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆