我在centos6.5(python3.5)上安装tensorflow-gpu,它需要张量板,这需要bleach==1.5.0,这需要:
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach==1.5.0)所以我从源代码安装了html5lib 0.9999999(7个9):
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,并确保已经安装了six 1.10.0。
发布于 2017-09-12 15:44:38
经过一番折腾之后,我发现在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个9),并在其他版本中占据主导地位。这就是为什么系统找不到所需的版本(3、6或7 9)的原因。我把这些都删掉了:
sudo -rf html5lib*并重新安装了7 nines版本,终于成功了。
https://stackoverflow.com/questions/46167032
复制相似问题