Skip to content

Installing pylint fails if pip module is not installed #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DonJayamanne opened this issue Nov 20, 2017 · 25 comments · Fixed by #380
Closed

Installing pylint fails if pip module is not installed #266

DonJayamanne opened this issue Nov 20, 2017 · 25 comments · Fixed by #380
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@DonJayamanne
Copy link

Installation of pylint fails when pip module is not installed.

@DonJayamanne DonJayamanne added awaiting 1-decision bug Issue identified by VS Code Team member as probable bug labels Nov 20, 2017
@DonJayamanne DonJayamanne added this to the December 2017 milestone Nov 20, 2017
@brettcannon
Copy link
Member

This can happen if your version of Python is rather old or if you're on Linux and your distribution doesn't include pip with Python by default and you have not installed pip yourself manually.

@smortaz
Copy link

smortaz commented Nov 21, 2017 via email

@brettcannon
Copy link
Member

@smortaz Did they take it out? I have Anaconda installed for Python 3.6 and it has pip out-of-the-box.

@smortaz
Copy link

smortaz commented Nov 21, 2017 via email

@brettcannon
Copy link
Member

Do you have the error message? Is it a permissions issue or something?

@DonJayamanne
Copy link
Author

@brettcannon , the new changes coming with Conda installer would display the following message to the user No installers available to install pylint

DonJayamanne added a commit that referenced this issue Dec 11, 2017
* Add support for pip and/or conda when installing modules
* Fix display versions for environments (fixes #378)
* Refactor installer to use the pip/conda module installer for installation of modules
* Performance improvement of detecting virtual env and setting it (fixes #372)
* Code refactor to ensure interpreter locators use the new DI framework
* Fixes #266
@Joilence
Copy link

@DonJayamanne Have the same problem.

@DonJayamanne
Copy link
Author

Hi @Joilence you'll need to install pip. Our current version will display a message rather than getting the user figure this out from the error message.
The solution for you is simple, please install pip

@DonJayamanne
Copy link
Author

@Joilence currently we're looking at improving the ux by providing some instructions to the user with more info on setting up python, pip etc when these tools aren't available.

@s-marashi
Copy link

s-marashi commented Dec 26, 2017

@DonJayamanne in my case while I am using a virtual enviroment and addressing it by variables(i.e. "python.pythonPath": "${HOME}/path/to/python" in setting file) it nags "No installers available to install pylint.", but when I use absolute path it works correctly.

@bbrendon
Copy link

bbrendon commented Dec 30, 2017

You can still fail and get these errors even with what everyone says above. You might have to Select the proper python version.

To select a specific interpreter, select the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).

Considering how unfriendly the software is to all of this, I would re-open this issue or link to an alternate fix for it.

@DonJayamanne
Copy link
Author

@bbrendon

You might have to Select the proper python version

That is the correct solution.

Considering how unfriendly the software is to all of this

Please could you elaborate further so we can understand the pain points clearly.
Fyi, we are looking into improving the ux in this space (such as displaying information to the user where they could download and install python/pip etc).

@bbrendon
Copy link

The UI says Python in the bottom right hand corner and I have everything python working except Code thinks otherwise (errors in this issue).

How am I supposed to know that I need to pick and interpreter when Python is already selected? The system doesn't tell you that. It just throws meaningless errors.

Maybe you can combine or connect the interpreter and language mode features.

@DonJayamanne
Copy link
Author

@bbrendon, agreed. This is something we'll be looking into, in the new year. Please could you create a separate issue with these details do it could be addressed specifically. Thanks.

@christopherdiehl
Copy link

Ubuntu 16.04, have both pip and pip3 installed. Getting same error message.

Info "No installers available to install pylint". VSCode v 1.18.0

@MikhailArkhipov
Copy link

Does it work better if you specify full path to python interpreter rather than just 'python'?

@devopsmariocom
Copy link

@MikhailArkhipov thanks! setting "python.pythonPath": "/usr/local/bin/python3" did fix the issue. It would be nice to mention python full path plus version in the error message to ring the bell.

@MikhailArkhipov
Copy link

We are improving path and settings handling in the next release :-)

@douglasg14b
Copy link

Added the path to the python install in, I get intellisense but pylint still can't install.... No installers available to install pylint

@brettcannon
Copy link
Member

@douglasg14b specifying the path to your Python interpreter won't solve the problem if you don't have pip installed. Are you running on macOS and using the system install?

@MikhailArkhipov
Copy link

#811

@farid220
Copy link

farid220 commented Apr 14, 2018

Hello Friends
I had the same issue and tried all of the solutions on github but no result
such as:
"code-runner.runInTerminal": true
"python.pythonPath": "/usr/local/bin/python3"
"globalModuleInstallation": true
and so on (granting root access for python path - and ....)
the solution was so simple and because the installer installs packages with python 3 , we should use pip3 (pip for python 3) either
just run this command and it is over

sudo apt-get install python3-pip

This is my first comment on github I apologies previously if I have some styling and grammatical problem

@sundevila84a19
Copy link

I tried the solution provided by@elmariofredo, just set "python.pythonPath=" to the python path in conda, then it works.

@j-paro
Copy link

j-paro commented May 19, 2018

@farid220 Your solution finally solved this issue for me. Thank you so much.

@ekodikara
Copy link

ekodikara commented Jul 2, 2018

Just do this in MacOS or Linux:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py 

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.