Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html5lib requires setuptools version 18.5 or above; please upgrade before installing (you have 0.6)

Tags:

python

pip

When i try to give a pip install on my requirements.txt file, it fails as mentioned below:

html5lib requires setuptools version 18.5 or above; please upgrade before installing (you have 0.6)

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5xXCfM/html5lib/ .

I did go through some of the previous post on this where some user mentioned it got resolved by specifying :

pip install html5lib --upgrade

But when i issue the above command it tells me to update the setup tools, and when I try to update or upgrade setuptools it says already up to date.

Can someone suggest me what can be done in this case?

like image 389
Jay Avatar asked Aug 26 '16 08:08

Jay


People also ask

How do I install setuptools a specific version?

To use a specific version of setuptools it is necessary to have it in both locations - in pyproject. toml and at the beginning of install_requires of setup.py. The tool like pip will use the version from pyproject. toml to build the project.

How do I set up Setuptools for Python on Windows?

Follow the below steps to install the Setuptools on Windows using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from here. Step 2: Extract the downloaded package using the given command. Step 3: Go to the setuptools-60.2.


1 Answers

It seems there's a bug in older html5lib versions that didn't support old setuptools versions, this is fixed in newer html5lib versions.

So you can require a newer version of html5lib or if you can't mess with your dependencies just upgrade your setuptools with:

pip install -U setuptools
like image 166
gonz Avatar answered Nov 07 '22 21:11

gonz