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

Error installing Jupyter on Ubuntu: AttributeError: _DistInfoDistribution__dep_map while #2605

Open
erelsgl opened this issue Jun 24, 2017 · 9 comments

Comments

@erelsgl
Copy link

erelsgl commented Jun 24, 2017

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

@irmowan
Copy link

irmowan commented Jul 4, 2017

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

@takluyver
Copy link
Member

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

@msiraj83
Copy link

@irmowan thanks.. it works for me

@lithp
Copy link

lithp commented Apr 25, 2018

@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?

@takluyver
Copy link
Member

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.

@lithp
Copy link

lithp commented Apr 26, 2018

Thank you for the quick response, that helps.

@Mathadon
Copy link

Mathadon commented Jun 8, 2018

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

Lestropie added a commit to MRtrix3/mrtrix3 that referenced this issue Jul 27, 2018
@amithadiraju1694
Copy link

@Mathadon Thanks ! It solved for me too..

@ghost
Copy link

ghost commented Feb 29, 2020

$sudo pip3 install --upgrade pip
$sudo pip3 install --upgrade setuptools
#RuntimeError: Python 3.5 or later is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants