-
Notifications
You must be signed in to change notification settings - Fork 3k
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 is completely malfunctioning after I upgraded to pip version 10. Fix it please! #5495
Comments
Hey @VincentCCandela! It seems you've installed a newer version of pip over an existing apt-manages installation on your system. Did you run pip with sudo? Before you run the following commands, could you provide the output of:
I think you can work around this by reinstalling the apt-installed version of pip and upgrading the version of pip to be installed in your user-local directory. Regardless, $ sudo apt install --reinstall python-pip
...
$ pip install --upgrade --user pip |
Outputs
|
@pradyunsg I don't know exactly what the Ubuntu It sounds like the Ubuntu script is too simplistic and doesn't ensure that it always accesses the system (apt installed) copy of pip. @rankun203 unless you need to upgrade pip, I'd suggest sticking with the system provided pip (and pushing Ubuntu to provide an updated version installable via apt). If you do need the new features, then you need to install a local copy of pip and run it via the pip wrapper that gets installed when you installed pip. Doing that will involve fixing up your PATH to ensure that it's preferred over the OS-supplied version, of course. |
@pfmoore Thanks for clarification, I ended up using the command from one of above comments:
And it worked, I'm not familiar with pip, so thank you a lot for answering those questions. If I need other versions of pip, now I prefer launch a Docker container. |
My apologies, I should have mentioned, |
Indeed. My bad. |
I think I am seeing a similar issue, on a CentOS Docker container which failed to build.
After the update, running
Looking at the contents of
What isn't clear to me is how this ever could have worked? Who generates the /usr/bin/pip-3.6 executable script? Is this a yum issue not a python/pip issue? |
pip is installing the updated pip in /usr/local/bin, and since you installed pip from the package manager its located in /usr/bin you need to mv the updated pip /usr/local/bin/pip to /usr/bin/pip This should work perfectly fine Version 2.* to 3.* Version 2.* Version 3.* |
@JReming85 --- That's a good workaround, but I do think the issue should be addressed in the package itself. Something as fundamental as "updating pip" should just work. |
If you were to compile/build your own version of pip it would work 100%, however since you are using a prebuilt version from the repository, its installing per the default self compiled location. Since you did not create the original package, maybe you should try using --install-options , --root or --target to tell it what bin you want to install in. |
Closing this issue in favor of #5599. |
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. |
Pip does not work at all. After running any pip command, I get this:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
from pip import main
ImportError: cannot import name main
The text was updated successfully, but these errors were encountered: