leinardi / pylint-pycharm

A plugin providing both real-time and on-demand scanning of Python files with PyLint from within PyCharm/IDEA.
Apache License 2.0
197 stars 35 forks source link

Failure: executable "/usr/local/bin/pylint" not found #34

Closed StevenMapes closed 5 years ago

StevenMapes commented 5 years ago

Observed Results:

Failure: executable "/usr/local/bin/pylint" not found

Expected Results:

Ok

Debugging

Confirm pylint location

>>>  which pylint
/usr/local/bin/pylint

Confirm pylint runs

>>> pylint --version
pylint 2.1.1
astroid 2.0.4
Python 3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609]
leinardi commented 5 years ago

Hi @StevenMapes, have you set an interpreter for the PyCharm project? If yes, is it the same where PyLint is installed?

StevenMapes commented 5 years ago

Ah no, it's using a VENV whereas pylint is installed globally. Does it need to be installed into the venv then?

leinardi commented 5 years ago

Yep, I should probably make it more clear but, unfortunately, PyLint must be installed in the same environment that is used for the PyCharm project.

asyschikov commented 5 years ago

@leinardi are there any particular reasons why pylint must be in the same env? I don't see a point in installing pylint in every env I use (dozens of them).

leinardi commented 5 years ago

Yes, the reason is that Pylint will look for the dependencies of the code that is analyzing in the same environment where it is executed so, if you run it on the system environment, you must have there all the dependencies of all your project, which can be very tricky if you need different versions of the same module for different projects.

asyschikov commented 5 years ago

@leinardi thanks for the explanation, makes sense.

zwn commented 4 years ago

I can run pylint installed with pipx from the command line. I understand it might be better to install it in the same venv as the project, but it can be run never the less. Can we make it work for the plugin as well?

fzyzcjy commented 2 years ago

I am facing the same problem in https://github.com/leinardi/pylint-pycharm/issues/89. Could you please provide some suggestions?

ewagner-verta commented 1 year ago

I'm having the same problem.

Pylint is definitely installed in my pyenv virtual environment (also the project interpreter)

Screen Shot 2023-02-02 at 11 08 05 AM

I am using that location as the path to the executable

Screen Shot 2023-02-02 at 11 08 40 AM

which I have confirmed exists Screen Shot 2023-02-02 at 11 12 56 AM

But still, this error:

Screen Shot 2023-02-02 at 11 11 37 AM