Notebook: Error installing Jupyter on Ubuntu: AttributeError: _DistInfoDistribution__dep_map while

Created on 25 Jun 2017  路  9Comments  路  Source: jupyter/notebook

While trying to install jupyter on Ubuntu 16.04, I get an error:

jupyter@lamp-nlu-java:~# sudo pip3 install jupyter
Downloading/unpacking jupyter
  Downloading jupyter-1.0.0-py2.py3-none-any.whl
Downloading/unpacking nbconvert (from jupyter)
  Downloading nbconvert-5.2.1-py2.py3-none-any.whl (382kB): 382kB downloaded
Downloading/unpacking ipywidgets (from jupyter)
  Downloading ipywidgets-6.0.0-py2.py3-none-any.whl (46kB): 46kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2482, in _dep_map
    return self.__dep_map
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2344, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

Most helpful comment

Same question.
My solution: sudo pip3 install --upgrade pip first

All 9 comments

Same question.
My solution: sudo pip3 install --upgrade pip first

Looks like a problem with pkg_resources; that's outside our control.

@irmowan thanks.. it works for me

@takluyver This fix works for me but I don't understand it and would like to. And I don't know what pkg_resources is. Could you explain more why this is outside of your control? Or, is there a resource somewhere else that I could read?

pkg_resources is another Python package, used for dealing with things related to installed packages. It's part of setuptools, which has been the cause of a number of headaches for us over the years (though it's improved recently).

I don't know exactly why the fix works, but it might be that an older version of pip was using pkg_resources for some operation, and a newer version found a different way to do what it needed to.

Thank you for the quick response, that helps.

I had the same problem on ubuntu 14.04, which was not resolved by upgrading pip3. However, this did work: sudo pip3 install --upgrade setuptools

@Mathadon Thanks ! It solved for me too..

$sudo pip3 install --upgrade pip
$sudo pip3 install --upgrade setuptools

RuntimeError: Python 3.5 or later is required

Was this page helpful?
0 / 5 - 0 ratings