Search code examples
ipythonjupyterihaskell

Unable to install IHaskel kernel into Jupyter: "could not parse version number"


I've recently completed the installation instructions for Haskell, and have reached the final step where I run

ihaskell install

to install the IHaskell kernel into Jupyter. However at this point I'm stuck, with the error

Detected IPython, but could not parse version number.
ihaskell: 
Ran commands: 
which ipython
/usr/local/bin/ipython --version
which /usr/local/bin/ipython

Exception: ExitFailure 1

which makes no sense, since when I run those commands myself, I get a valid (and required) version number:

$ which ipython
/usr/local/bin/ipython

$ /usr/local/bin/ipython --version
4.0.0

$ which /usr/local/bin/ipython
/usr/local/bin/ipython

How do I proceed to install the IHaskell kernel into Jupyter?


Solution

  • This is a (soon to be addressed) limitation of the current version of IHaskell, which only supports IPhython 3.0.

    Stepping back to 3.0 with

    pip uninstall ipython
    pip uninstall jupyter_core
    pip install ipython[notebook]==3.0
    

    will resolve the problem until IHaskell is updated, at which point it will be safe to restore the current version of IPython with

    pip install ipython[notebook] --upgrade
    

    Note that stepping back to 3.0 will result in view visible differences, though the expected location of settings files will change.