找不到pip安装的pylint [英] pip installed pylint cannot be found

查看:356
本文介绍了找不到pip安装的pylint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

围绕此问题有很多,所以可能是重复的,但是我找不到解决方案,所以去吧.

There's a lot of questions around this, so it might be a duplicate, but I can't find a solution, so here goes..

我想在原子上使用pylint.如果我使用推荐的pip install --user pylint,它似乎可以工作,但是无法找到原子,我也不能; which pylintwhereis pylint不返回任何内容.如果我使用pip3,同样的事情也会发生.

I want to use pylint with atom. If I use the recommended pip install --user pylint it seems to work but atom can't find and neither can I; which pylint and whereis pylintreturn nothing. The same thing goes if I use pip3.

如果我违背智慧并使用sudo pip install pylint,发现它是 ,但是现在我得到了与原子不同的错误:unable to determine environment.

If I go against wisdom and use sudo pip install pylint it is found but now I get a different error with atom: unable to determine environment.

有什么建议吗?

推荐答案

如果which pylint找不到可执行文件但已安装该软件包,则它不在您的PATH中.卸载使用sudo安装的pylint,然后以用户身份重新安装,现在运行

If which pylint does not find the executable but the package is installed, it is not in your PATH. Uninstall pylint you have installed with sudo and reinstall it as user, now run

$ PATH=$HOME/Library/Python/2.7/bin:$PATH which pylint

应该立即找到它.确认可以访问pylint可执行文件后,编辑.bash_profile并在底部添加两行:

It should be found now. After you have verified pylint executable is accessible, edit your .bash_profile and add the two lines at the bottom:

PATH="${HOME}/Library/Python/2.7/bin:${PATH}"
export PATH

这篇关于找不到pip安装的pylint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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