Skip to content
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

pip.main error code #5588

Closed
oliver-leung opened this issue Jul 9, 2018 · 2 comments
Closed

pip.main error code #5588

oliver-leung opened this issue Jul 9, 2018 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: invalid Invalid issue/PR type: support User Support

Comments

@oliver-leung
Copy link

  • Pip version: 10.0.1
  • Python version: 3.7
  • Operating system: Windows 7

I'm trying to call the pip.main function:

>>> import pip
>>> pip.main(['install', '--user', 'numpy'])
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/f3/71/94628784c3f07d4bc0dd38f8753e3f751d66cfd5a6823591179608c27f09/numpy-1.14.5-cp35-none-win_amd64.whl (13.4MB)
2

But I'm not getting any indication that the package was installed. Replacing the package with a fake returns the following:

>>> import pip
>>> pip.main(['install', '--user', 'foo'])
Collecting numpy
1

So this implies that the last number is some sort of error code, but I can't seem to find any documentation on what the error code means. Is there some documentation anywhere on what they mean?

@pfmoore
Copy link
Member

pfmoore commented Jul 9, 2018

Calling internal APIs of pip (like pip.main) from your own code is not supported. See here for the details.

In this case, something weird is going on, as pip 10.0.1 doesn't even provide a pip.main function. So it looks like your installation is misconfigured, or you're not running the version of pip that you thought you were.

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: invalid Invalid issue/PR type: support User Support
Projects
None yet
Development

No branches or pull requests

3 participants