Reputation: 268
Recently I have updated flake8
from 2.3.0
to 2.4.0
by pip, and pep8
up to 1.6.2
, now I can't run flake8
due to 2.4.0
not support >1.6
pep8
.
Is there any way to downgrade pep8
to a previous version by pip?
Bug Put upper cap on dependencies. The caps for 2.4.0
are:
pep8 < 1.6 (Related to GitLab#35)
mccabe < 0.4
pyflakes < 0.9
Upvotes: 1
Views: 697
Reputation: 1122022
The last pep8
release before 1.6 was 1.5.7 (see the full list of releases); install that with pip
by using a pin:
pip install --force pep8==1.5.7
You'll see something like:
$ pip install --force pep8==1.5.7
Collecting pep8==1.5.7
Downloading pep8-1.5.7-py2.py3-none-any.whl
Installing collected packages: pep8
Found existing installation: pep8 1.6.2
Uninstalling pep8-1.6.2:
Successfully uninstalled pep8-1.6.2
Successfully installed pep8-1.5.7
Alternatively, let pip
figure out the last version before 1.6 for you:
pip install --force "pep8<1.6"
Also see issue 35 in the flake8 repository; the alternative is to downgrade flake8
:
pip install --force flake8==2.3.0
A fix for pep8
is under way, hopefully soon we can find a way out of the current quagmire.
Upvotes: 3
Reputation: 1959
You can also install pep8 by following command:
pip install "pep8>=1.5,<1.6"
This will install the latest version of pep8 but less than 1.6 and greater than 1.5. If you face any problem, first you can uninstall pep8, and then install it using above command.
Currently I am using flake8 2.4.0
and pep8 1.5.7
and it is running with out any problem.
Upvotes: 0