Currently using Lubuntu 14.11 and python2. By default pip 1.5.6-2 is supposed to be installed.
However, I've installed PyCharm 4.0.6 and installed modules via it. It offered me to upgrade package to pip 6.1.1, which I did. However, I think it broke something, but not quite sure (I am new to python).
I attempted to reinstall python-pip 1.5.6-2 via package manager, which seemed to go through fine, but I still have the exceptions. Again, trying to upgrade by doing "pip install -U pip", I get this:
jayachar88@kailash:~$ pip install -U pip
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-6.1.1-py2.py3-none-any.whl#md5=172eb5abab25a5e0f7a7b63c7a49378d
Downloading pip-6.1.1-py2.py3-none-any.whl (1.1MB): 1.1MB downloaded
Installing collected packages: pip
Found existing installation: pip 1.5.6
Uninstalling pip:
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1431, in install
requirement.uninstall(auto_confirm=True)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 598, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1836, in remove
renames(path, new_path)
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 295, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/pip'
Storing debug log for failure in /home/jayachar88/.pip/pip.log
Pastebin for pip.log: http://pastebin.com/PF16JyBC
After reading around quite a bit on several similar / somewhat related bug reports, the following 2 steps solved it for me (or seem to have solved it for now):
$ sudo python -m pip install --upgrade --force setuptools
$ sudo python -m pip install --upgrade --force pip
<3
I'm not sure this is a bug - _possibly_ a docs issue? Changing global state on your machine requires sudo...
Yea, this isn't a bug, you need to use sudo
to change your global Python installation.
Solved my problem! :)
Dear @jayachar88 ,
Not only did you solve this bug, but also a greater bug of Ubuntu community, which is the software-center crash bug.
The blogs on the web are full of 'false solution' to software-center bug affecting ubuntu users.
I diagnosed the problem as a pip bug or pip configuration corruption.
so, using the:
$ sudo python -m pip install --upgrade --force setuptools
$ sudo python -m pip install --upgrade --force pip
solved both the problems. THANK YOU!!!
Getting following error, whenever trying to install anything using pip also i'm using proxy:
ts/sessions.py", line 576, in send
r = adapter.send(request, *kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/c
achecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, *kw)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/reques
ts/adapters.py", line 376, in send
timeout=timeout
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib
3/connectionpool.py", line 610, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib
3/util/retry.py", line 228, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
@aashish-ak thats a issue with your distro, which has split out pip in a way thats known to break interestingly
same problem in windows. How can I solve it?
@dildilmurod
$ sudo python -m pip install --upgrade --force setuptools
$ sudo python -m pip install --upgrade --force pip
and if wont fix then
$ sudo apt-get install python3-pip
then use the pip3 instead of pip.
best of luck!
@AymaneZizi: he's using Windows...
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.
Most helpful comment
After reading around quite a bit on several similar / somewhat related bug reports, the following 2 steps solved it for me (or seem to have solved it for now):
$ sudo python -m pip install --upgrade --force setuptools
$ sudo python -m pip install --upgrade --force pip