html5lib cannot be found in bleach installation

1.8k views Asked by At

I'm installing tensorflow-gpu on centos6.5(python3.5) which requires tensor-board which requires bleach==1.5.0 which requires:

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

so I installed html5lib 0.9999999(7 nines) from source:

python setup.py install

And I verified the installation by import html5lib in python:

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

seems successful. Then I tried to install 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)

And error occured :

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)

For some reason the installing computer has no network connection. So I download the required whl files and tar.gz from another computer and upload it to the installing computer. I also tried html5lib 0.999, which didn't work either and report the same error. I refered this oneenter link description here, and ensure that six 1.10.0 has been installed.

1

There are 1 answers

0
Zhang On

After some tossing-about, I found that there are several versions of html5lib in python_path/lib/python3.5/site-packages/ :

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

The version 0.999999999(9 nines) was firstly installed and dominates among others. That why the system cannot find the required version(3 or 6 or 7 nines). I deleted all of these:

sudo -rf html5lib*

and reinstalled the 7 nines version, it worked at last.