0

我在 centos6.5(python3.5) 上安装 tensorflow-gpu,它需要张量板,它需要漂白剂 ==1.5.0,它需要:

Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach==1.5.0)

所以我从源代码安装了 html5lib 0.9999999(7 个九):

python setup.py install

我通过在 python 中导入 html5lib 验证了安装:

Python 3.5.0 (default, Sep 10 2017, 00:16:28) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import html5lib
>>> 

似乎很成功。然后我尝试安装bleach1.5.0:

$ sudo pip install bleach-1.5.0-py2.py3-none-any.whl  
Processing ./bleach-1.5.0-py2.py3-none-any.whl
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from 
bleach==1.5.0)

并发生错误:

Could not find a version that satisfies the requirement 
html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach==1.5.0) (from 
versions: )
No matching distribution found for html5lib!=0.9999,!=0.99999,
<0.99999999,>=0.999 (from bleach==1.5.0)

由于某种原因,安装计算机没有网络连接。因此,我从另一台计算机下载所需的 whl 文件和 tar.gz 并将其上传到安装计算机。我也尝试了 html5lib 0.999,它也没有工作并报告同样的错误。我参考了这个enter link description here,并确保已经安装了六个 1.10.0。

4

1 回答 1

0

经过一番折腾,我发现在 python_path/lib/python3.5/site-packages/ 中有几个版本的html5lib:

html5lib
html5lib-0.999999999.dist-info
html5lib-0.9999999-py3.5.egg-info
html5lib-0.999999-py3.5.egg-info
html5lib-0.999-py3.5.egg-info

版本 0.999999999(9 个九)首先安装并占主导地位。这就是为什么系统找不到所需的版本(3 或 6 或 7 个九)。我删除了所有这些:

sudo -rf html5lib*

并重新安装了7个九的版本,它终于工作了。

于 2017-09-12T07:44:37.513 回答