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 10 isn't working #5318

Closed
shigabeev opened this issue Apr 21, 2018 · 7 comments
Closed

pip 10 isn't working #5318

shigabeev opened this issue Apr 21, 2018 · 7 comments
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support

Comments

@shigabeev
Copy link

  • Pip version: 10
  • Python version: 3.6.4
  • Operating system: Mac OS X High Sierra

Description:

I was installing packages for itorch and pip stated that new version available.
Since then it cannot install new packages.

I run:
$ pip install --upgrade pip
And it was successfully installed. But seems like something doesn't installed well as

What I've run:

$ pip install --upgrade numpy
Traceback (most recent call last):
File "/usr/local/opt/python/libexec/bin/pip", line 7, in
from pip import main
ImportError: cannot import name 'main'

$ pip install torch
Traceback (most recent call last):
File "/usr/local/opt/python/libexec/bin/pip", line 7, in
from pip import main
ImportError: cannot import name 'main'

@benoit-pierre
Copy link
Member

See this comment.

@pradyunsg
Copy link
Member

Hey @shigabeev!

It seems you're facing a similar issue as #5221. You can find a summary for resolving your problems in #5221 (comment).

If that helps, please feel free to close this issue. :)

@pradyunsg pradyunsg added type: support User Support S: awaiting response Waiting for a response/more information labels Apr 21, 2018
juusechec added a commit to GLUD/NetworkingGraph that referenced this issue Apr 23, 2018
@muayyad-alsadi
Copy link

you can upgrade pip using pip install --user --upgrade pip
but then make sure you are using the upgraded version of pip (not your distro version) from ~/.local/bin/pip
you can do this by editing your ~/.bashrc to have

export PATH="~/.local/bin:$PATH"

@OIdiotLin
Copy link

just edit pip entrance file like this (worked for me):

change main to __main__.

#!/usr/bin/python3

# -*- coding: utf-8 -*-
import re
import sys

from pip import __main__

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(__main__._main())

@pradyunsg
Copy link
Member

@OIdiotLin That's not a good way to fix this problem and might break at some point in the future.

As I mentioned in the linked comment above, this issue can be resolved in much better, supported ways.

@pradyunsg
Copy link
Member

Anyways, since OP hasn't responded for a week, I'll close this issue as resolved.

@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Apr 28, 2018
erichanson added a commit to aquametalabs/aquameta that referenced this issue Jul 2, 2018
@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 type: support User Support
Projects
None yet
Development

No branches or pull requests

5 participants