如何为python2.7安装pylint? [英] How can I install the pylint for python2.7?

查看:76
本文介绍了如何为python2.7安装pylint?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 ubuntu 18.04 中为 python2.7 安装 pylint,但它用这个词引发了一个错误:

I try to install the pylint for the python2.7 which in ubuntu 18.04, but it raises an error with this words:

pip install pylint                                  
Collecting pylint
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/04/1f/1d3929051b45c3e4015178c5fe5bbee735fb4e362e0fc4f0fbf3f68647ad/pylint-2.1.1.tar.gz
pylint requires Python '>=3.4.*' but the running Python is 2.7.15

我已经使用pip3为python3.6成功安装了pylint.

I have been used the pip3 installed the pylint successfully for python3.6.

那么,如何为python2.7安装pylint?

So, how can I install the pylint for python2.7?

推荐答案

pylint 仍然保持对 Python 2 的支持,直到明年左右.但是您需要安装 1.9.X 而不是 2.X.虽然您已经安装了 pylint,但是一旦您卸载它,您应该可以获得 1.9.

pylint still maintains support for Python 2 until maybe next year or so. But you need to install 1.9.X instead of 2.X. It seems though that you already had pylint installed, once you uninstall it you should be able to get 1.9 instead.

这篇关于如何为python2.7安装pylint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆