1. 程式人生 > >anaconda3 安裝tensorflow 報Cannot remove entries fro

anaconda3 安裝tensorflow 報Cannot remove entries fro

python 安裝報錯

今天要在ananconda3 下安裝Keras & TensorFlow 結果第一個很順利,但是第二個的時候就報錯了

[root@worker01 bin]# ./pip3.6 install tensorflow

Collecting tensorflow

Using cached https://files.pythonhosted.org/packages/22/c6/d08f7c549330c2acc1b18b5c1f0f8d9d2af92f54d56861f331f372731671/tensorflow-1.8.0-cp36-cp36m-manylinux1_x86_64.whl

Requirement already satisfied: six>=1.10.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.10.0)

Requirement already satisfied: absl-py>=0.1.6 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.2.2)

Requirement already satisfied: gast>=0.2.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.2.0)

Requirement already satisfied: protobuf>=3.4.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (3.5.2.post1)

Requirement already satisfied: astor>=0.6.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.6.2)

Requirement already satisfied: termcolor>=1.1.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.1.0)

Requirement already satisfied: wheel>=0.26 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.29.0)

Requirement already satisfied: grpcio>=1.8.6 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.12.0)

Collecting tensorboard<1.9.0,>=1.8.0 (from tensorflow)

Using cached https://files.pythonhosted.org/packages/59/a6/0ae6092b7542cfedba6b2a1c9b8dceaf278238c39484f3ba03b03f07803c/tensorboard-1.8.0-py3-none-any.whl

Requirement already satisfied: numpy>=1.13.3 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.13.3)

Requirement already satisfied: setuptools in /opt/anaconda3/lib/python3.6/site-packages (from protobuf>=3.4.0->tensorflow) (36.5.0.post20180212)

Collecting bleach==1.5.0 (from tensorboard<1.9.0,>=1.8.0->tensorflow)

Using cached https://files.pythonhosted.org/packages/33/70/86c5fec937ea4964184d4d6c4f0b9551564f821e1c3575907639036d9b90/bleach-1.5.0-py2.py3-none-any.whl

Collecting html5lib==0.9999999 (from tensorboard<1.9.0,>=1.8.0->tensorflow)

Requirement already satisfied: markdown>=2.6.8 in /opt/anaconda3/lib/python3.6/site-packages (from tensorboard<1.9.0,>=1.8.0->tensorflow) (2.6.11)

Requirement already satisfied: werkzeug>=0.11.10 in /opt/anaconda3/lib/python3.6/site-packages (from tensorboard<1.9.0,>=1.8.0->tensorflow) (0.12.2)

Installing collected packages: html5lib, bleach, tensorboard, tensorflow

Found existing installation: html5lib 0.999999999

Cannot remove entries from nonexistent file /opt/anaconda3/lib/python3.6/site-packages/easy-install.pth


更新 tensorflow 到 Version: 1.0.0 時,必須要先更新 setuptools

先更新 esay_install –-upgrade setuptools 成功了

[root@worker01 bin]# ./easy_install --upgrade setuptools

Searching for setuptools

Reading https://pypi.python.org/simple/setuptools/

Downloading https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip#sha256=f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2

Best match: setuptools 39.2.0

Processing setuptools-39.2.0.zip

Writing /tmp/easy_install-dcf2xle9/setuptools-39.2.0/setup.cfg

Running setuptools-39.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dcf2xle9/setuptools-39.2.0/egg-dist-tmp-eiiyc4hm

/opt/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'project_urls'

warnings.warn(msg)

Moving setuptools-39.2.0-py3.6.egg to /opt/anaconda3/lib/python3.6/site-packages

Adding setuptools 39.2.0 to easy-install.pth file

Installing easy_install script to /opt/anaconda3/bin

Installing easy_install-3.6 script to /opt/anaconda3/bin


Installed /opt/anaconda3/lib/python3.6/site-packages/setuptools-39.2.0-py3.6.egg

Processing dependencies for setuptools

Finished processing dependencies for setuptools


然後在安裝./pip install tensorflow

[root@worker01 bin]# ./pip3.6 install tensorflow

Collecting tensorflow

Using cached https://files.pythonhosted.org/packages/22/c6/d08f7c549330c2acc1b18b5c1f0f8d9d2af92f54d56861f331f372731671/tensorflow-1.8.0-cp36-cp36m-manylinux1_x86_64.whl

Requirement already satisfied: grpcio>=1.8.6 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.12.0)

Requirement already satisfied: numpy>=1.13.3 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.13.3)

Requirement already satisfied: wheel>=0.26 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.29.0)

Requirement already satisfied: six>=1.10.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.10.0)

Requirement already satisfied: gast>=0.2.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.2.0)

Requirement already satisfied: termcolor>=1.1.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (1.1.0)

Requirement already satisfied: protobuf>=3.4.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (3.5.2.post1)

Requirement already satisfied: astor>=0.6.0 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.6.2)

Collecting tensorboard<1.9.0,>=1.8.0 (from tensorflow)

Using cached https://files.pythonhosted.org/packages/59/a6/0ae6092b7542cfedba6b2a1c9b8dceaf278238c39484f3ba03b03f07803c/tensorboard-1.8.0-py3-none-any.whl

Requirement already satisfied: absl-py>=0.1.6 in /opt/anaconda3/lib/python3.6/site-packages (from tensorflow) (0.2.2)

Requirement already satisfied: setuptools in /opt/anaconda3/lib/python3.6/site-packages (from protobuf>=3.4.0->tensorflow) (36.5.0.post20180212)

Collecting bleach==1.5.0 (from tensorboard<1.9.0,>=1.8.0->tensorflow)

Using cached https://files.pythonhosted.org/packages/33/70/86c5fec937ea4964184d4d6c4f0b9551564f821e1c3575907639036d9b90/bleach-1.5.0-py2.py3-none-any.whl

Requirement already satisfied: werkzeug>=0.11.10 in /opt/anaconda3/lib/python3.6/site-packages (from tensorboard<1.9.0,>=1.8.0->tensorflow) (0.12.2)

Requirement already satisfied: markdown>=2.6.8 in /opt/anaconda3/lib/python3.6/site-packages (from tensorboard<1.9.0,>=1.8.0->tensorflow) (2.6.11)

Collecting html5lib==0.9999999 (from tensorboard<1.9.0,>=1.8.0->tensorflow)

Installing collected packages: html5lib, bleach, tensorboard, tensorflow

Found existing installation: html5lib 0.999999999

Uninstalling html5lib-0.999999999:

Successfully uninstalled html5lib-0.999999999

Found existing installation: bleach 2.0.0

Uninstalling bleach-2.0.0:

Successfully uninstalled bleach-2.0.0

Successfully installed bleach-1.5.0 html5lib-0.9999999 tensorboard-1.8.0 tensorflow-1.8.0


[root@worker01 bin]# ./pip show tensorflow

Name: tensorflow

Version: 1.8.0

Summary: TensorFlow helps the tensors flow

Home-page: https://www.tensorflow.org/

Author: Google Inc.

Author-email: [email protected]

License: Apache 2.0

Location: /opt/anaconda3/lib/python3.6/site-packages

Requires: termcolor, astor, protobuf, gast, six, tensorboard, wheel, numpy, grpcio, absl-py

Required-by:

[root@worker01 bin]# ./pip show keras

Name: Keras

Version: 2.1.6

Summary: Deep Learning for humans

Home-page: https://github.com/keras-team/keras

Author: Francois Chollet

Author-email: [email protected]

License: MIT

Location: /opt/anaconda3/lib/python3.6/site-packages

Requires: six, h5py, scipy, pyyaml, numpy

Required-by:


anaconda3 安裝tensorflow 報Cannot remove entries fro