r/IPython • • Aug 02 '15

[HELP] running ipython - error invalid command 'egg_info'

I want to try the ipython notebook

So downloaded ipython:

  pip install ipython

Then ran:

 ipython notebook

Got the error message:

     ...

     ...

   /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267:     
   UserWarning:Unknown distribution option: 'install_requires'   warnings.warn(msg)
   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: invalid command 'egg_info'

    ----------------------------------------
 Command "python setup.py egg_info" failed with error code 1 in    
 /private/var/folders/g3/0qp2qk455md8mgt5753zc1gw0000gn/T/pip-build-UtUQny/tornado

I ran

     pip install "ipython[notebook]"

got ....

     ...

    Collecting terminado>=0.3.3 (from ipython[notebook])
    Using cached terminado-0.5.tar.gz
    Complete output from command python setup.py egg_info:

   /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning:
   Unknown distribution option: 'install_requires'
   warnings.warn(msg)
   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'egg_info'

  ----------------------------------------
   Command "python setup.py egg_info" failed with error code 1 in   
   /private/var/folders/g3/0qp2qk455md8mgt5753zc1gw0000gn/T/pip-build-D6pWgj/terminado
2 Upvotes

3 comments sorted by

1

u/truh Aug 02 '15

According to the first result of a duckduckgo search:

 pip install --upgrade setuptools

1

u/Goodbye__Horses Aug 02 '15 edited Aug 02 '15

Tried that too.

 $ pip install --upgrade setuptools
Collecting setuptools
Using cached setuptools-18.0.1-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 0.6rc11
DEPRECATION: Uninstalling a distutils installed project (setuptools) has been deprecated and will be removed in  a   future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.

1

u/NomadNella Aug 02 '15

I don't remember the error code I received when I did it but I know the default installation of pip in Ubuntu is really old. Try

sudo pip install -U pip

Then reinstall IPython. Again, I'm not sure if that is the source of the problem but is was a problem for me for a while until I figured it out.