1

I am following this and I am getting:

gsamaras@gsamaras-A15:~$ sudo pip install "ipython[notebook]"
Downloading/unpacking ipython[notebook]
  Downloading ipython-4.2.0-py2-none-any.whl (736kB): 736kB downloaded
Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in /usr/local/lib/python2.7/dist-packages (from ipython[notebook])
Requirement already satisfied (use --upgrade to upgrade): decorator in /usr/lib/python2.7/dist-packages (from ipython[notebook])
Downloading/unpacking pickleshare (from ipython[notebook])
  Downloading pickleshare-0.7.2-py2.py3-none-any.whl
Downloading/unpacking traitlets (from ipython[notebook])
  Downloading traitlets-4.2.1-py2.py3-none-any.whl (67kB): 67kB downloaded
Requirement already satisfied (use --upgrade to upgrade): pexpect; sys_platform != "win32" in /usr/lib/python2.7/dist-packages (from ipython[notebook])
Downloading/unpacking simplegeneric>0.8 (from ipython[notebook])
  Downloading simplegeneric-0.8.1.zip
  Running setup.py (path:/tmp/pip_build_root/simplegeneric/setup.py) egg_info for package simplegeneric

Downloading/unpacking backports.shutil-get-terminal-size (from ipython[notebook])
  Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
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 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1091, in prepare_files
    req_to_install.check_if_exists()
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 811, in check_if_exists
    self.satisfied_by = pkg_resources.get_distribution(self.req)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 535, in get_distribution
    dist = get_provider(dist)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 415, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
IndexError: list index out of range

Storing debug log for failure in /home/gsamaras/.pip/pip.log

How to bypass this?


Edit:

gsamaras@gsamaras-A15:~$ sudo pip install -U pip
Downloading/unpacking pip from https://pypi.python.org/packages/9c/32/004ce0852e0a127f07f358b715015763273799bd798956fa930814b60f39/pip-8.1.2-py2.py3-none-any.whl#md5=0570520434c5b600d89ec95393b2650b
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.4
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...
7
  • Can you try upgrading pip using sudo pip install -U pip and then redo the installation of the IPython notebook?
    – edwinksl
    Jun 24, 2016 at 19:23
  • Hmm check the edit @edwinksl, I do not think the update was made.
    – gsamaras
    Jun 24, 2016 at 19:24
  • Hmm, are you familiar with using virtualenv? It is a lot easier to get away with doing whatever one wants (including upgrading pip to arbitrary versions) in a virtualenv.
    – edwinksl
    Jun 24, 2016 at 19:26
  • Nop but I think it worked @edwinksl. I think you should post an answer with your first comment! :D
    – gsamaras
    Jun 24, 2016 at 19:28
  • That's strange because, like you said, the output of pip is not super clear about what pip really did.
    – edwinksl
    Jun 24, 2016 at 19:29

1 Answer 1

2

This is probably caused by having an outdated version of pip. You can upgrade pip by running:

sudo pip install -U pip

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .