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

IPython 4.0 not supported #553

Closed
jbcoe opened this issue Aug 12, 2015 · 43 comments
Closed

IPython 4.0 not supported #553

jbcoe opened this issue Aug 12, 2015 · 43 comments

Comments

@jbcoe
Copy link

jbcoe commented Aug 12, 2015

Starting the kernel with IPython 4.0 gives the following error:

ihaskell: main/Main.hs:(66,1)-(73,35): Non-exhaustive patterns in function ihaskell

When run from IPython (4.0) notebook, the kernel is reported as dead but seems to execute cells perfectly useably.

@gibiansky
Copy link
Member

Have you run ihaskell install?

@gibiansky
Copy link
Member

I've pushed a minor update to Github that should at least have better error messages in this case.

@wyager
Copy link
Contributor

wyager commented Aug 13, 2015

BTW, when I use the cabal-install'ed version of IHaskell, I get

Detected IPython, but could not parse version number.

Because it only knows versions up to 3.

@gibiansky
Copy link
Member

I've just pushed a commit to Github master to take care of this. Hackage will be updated shortly. Let me know if master works for you if you try it.

@jbcoe
Copy link
Author

jbcoe commented Aug 13, 2015

I'll try cabal later on today.

@jbcoe
Copy link
Author

jbcoe commented Aug 13, 2015

ihaskell-0.6.4.1 (from cabal) is reporting
ihaskell: main/Main.hs:(200,1)-(294,23): Non-exhaustive patterns in function replyTo

@gibiansky
Copy link
Member

It sounds like there are some significant differences between IPython 3 and IPython 4, so I'll have to put some effort in soon to get IPython 4 supported. For the time being I recommend downgrading to IPython 3.

@gibiansky gibiansky changed the title Error starting kernel with IPython 4.0: Non-exhaustive patterns in function ihaskell IPython 4.0 not supported Aug 13, 2015
@jbcoe
Copy link
Author

jbcoe commented Aug 13, 2015

I don't need IHaskell for anything other than playing around with so I'm happy to keep it broken and field test patches/fixes as often as would be helpful.

@gibiansky
Copy link
Member

I think it works now. @jbcoe let me know if it works for you. If you install from Github. If it doesn't work, run ihaskell install --debug and let me know what it prints?

@jbcoe
Copy link
Author

jbcoe commented Aug 16, 2015

It installs and runs but claims that the kernel is dead.
I get:

[W 15:00:27.013 NotebookApp] 404 GET /static/components/codemirror/mode/ihaskell/ihaskell.js?v=20150816150016 (::1) 11.84ms referer=http://localhost:8888/notebooks/Learning%20Haskell.ipynb ihaskell: main/Main.hs:(204,1)-(298,23): Non-exhaustive patterns in function replyTo

@gibiansky
Copy link
Member

Strange – it is working on my machine. Could you run the following in your shell and let me know what it prints:

cat $(jupyter --data-dir)/kernels/haskell/kernel.json

@jbcoe
Copy link
Author

jbcoe commented Aug 16, 2015

I removed haskell from ~/Library/Jupyter/kernels and removed .cabal and .ghc

I set up ihaskell using macos-install.sh and ihaskell install

cat $(jupyter --data-dir)/kernels/haskell/kernel.json gives me:

{"display_name":"Haskell","argv":["/Users/jon/.cabal/bin/ihaskell","kernel","{connection_file}","--ghclib","/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2"],"language":"haskell"}

@gibiansky
Copy link
Member

Can you install it with --debug?
On Aug 16, 2015 1:48 PM, "Jonathan B Coe" notifications@github.com wrote:

I removed haskell from ~/Library/Jupyter/kernels and removed .cabal and
.ghc

I set up ihaskell using macos-install.sh and ihaskell install

cat $(jupyter --data-dir)/kernels/haskell/kernel.json gives me:

{"display_name":"Haskell","argv":["/Users/jon/.cabal/bin/ihaskell","kernel","{connection_file}","--ghclib","/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2"],"language":"haskell"}


Reply to this email directly or view it on GitHub
#553 (comment).

@jbcoe
Copy link
Author

jbcoe commented Aug 16, 2015

Here's the output after it having installed with --debug (I'm running jupyter-notebook with a trivial haskell notebook).

Header: {"username":"jon","msg_type":"kernel_info_request","msg_id":"f39c2c48-851b-4293-bdb9-96874028003c","version":"5.0","session":"8218D2934F34415095A71ECB4E924775","date":"2015-08-16T23:16:48.571450"} Content: {} [W 23:16:48.819 NotebookApp] 404 GET /static/components/codemirror/mode/ihaskell/ihaskell.js?v=20150816231640 (::1) 11.75ms referer=http://localhost:8888/notebooks/Learning%20Haskell.ipynb Message: KernelInfoReply {header = MessageHeader {identifiers = ["\NULD1\183\130"], parentHeader = Just (MessageHeader {identifiers = ["\NULD1\183\130"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "f39c2c48-851b-4293-bdb9-96874028003c"}, sessionId = UUID {uuidToString = "8218D2934F34415095A71ECB4E924775"}, username = "jon", msgType = KernelInfoRequestMessage}), metadata = fromList [], messageId = UUID {uuidToString = "c0cd1b44-7ea1-4a3b-a335-510e4c020ddc"}, sessionId = UUID {uuidToString = "8218D2934F34415095A71ECB4E924775"}, username = "jon", msgType = KernelInfoReplyMessage}, versionList = [7,10,2], language = "haskell"} Sent: "{\"language_version\":[7,10,2],\"protocol_version\":\"5.0\",\"language\":\"haskell\"}" Header: {"username":"username","version":"5.0","msg_id":"3EEF692EE0714213818B1C80D3818E44","msg_type":"kernel_info_request","session":"8218D2934F34415095A71ECB4E924775"} Content: {} Message: KernelInfoReply {header = MessageHeader {identifiers = ["8218D2934F34415095A71ECB4E924775"], parentHeader = Just (MessageHeader {identifiers = ["8218D2934F34415095A71ECB4E924775"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "3EEF692EE0714213818B1C80D3818E44"}, sessionId = UUID {uuidToString = "8218D2934F34415095A71ECB4E924775"}, username = "username", msgType = KernelInfoRequestMessage}), metadata = fromList [], messageId = UUID {uuidToString = "a818a6d6-4748-4607-ba0c-ffae9b9c3171"}, sessionId = UUID {uuidToString = "8218D2934F34415095A71ECB4E924775"}, username = "username", msgType = KernelInfoReplyMessage}, versionList = [7,10,2], language = "haskell"} Sent: "{\"language_version\":[7,10,2],\"protocol_version\":\"5.0\",\"language\":\"haskell\"}" Header: {"username":"username","version":"5.0","msg_id":"8CD35CE75600481DAF9B4821D3D49433","msg_type":"comm_open","session":"8218D2934F34415095A71ECB4E924775"} Content: {"target_name":"ipython.widget","data":{"widget_class":"ipywidgets.CommInfo"},"comm_id":"FD56482A39184864972833F7A4C323A1"} ihaskell: main/Main.hs:(204,1)-(298,23): Non-exhaustive patterns in function replyTo

@sawcordwell
Copy link

Hi,

I just tried installing IHaskell with most recent Jupyter also. No .cabal or .ghc directories in home directory.

I cloned the repo from Github (commit 96ce950). Then ran

./build.sh ihaskell

which gave this output:

The command "ihaskell install" failed. Please check your 'ipython --version'. 3.0 or up is required but it is 4.0.0!

ihaskell install --debug

Gives output:

Detected Jupyter, but could not parse version number.
ihaskell: 
Ran commands: 
which jupyter
which ipython
/home/steve/.local/bin/jupyter --version
which /home/steve/.local/bin/jupyter

Exception: ExitFailure 1

Thanks for working on this project!

@gibiansky
Copy link
Member

@sawcordwell Can you run the following commands and tell me what the output is?

/home/steve/.local/bin/jupyter --version 
/home/steve/.local/bin/jupyter --version >/dev/null
/home/steve/.local/bin/jupyter --version 2>/dev/null

@gibiansky
Copy link
Member

@jbcoe The debug output is incredibly strange. Do you have any IPython extensions installed or anything? Is this a fresh IPython install? There are strange messages associated with IPython widgets in the log.

Could you run these commands and tell me their output to help me diagnose the problem?

find $(jupyter --data-dir) -type f
find $(jupyter --config-dir) -type f

(You may need to change the commands to make them work with Mac OS X's default find utility, I'm not sure...)

Can you also show me or send me the notebook you're using to test?

@sawcordwell
Copy link

> /home/steve/.local/bin/jupyter --version 

4.0.3

> /home/steve/.local/bin/jupyter --version >/dev/null

4.0.3

> /home/steve/.local/bin/jupyter --version 2>/dev/null

(no output)

@gibiansky
Copy link
Member

@sawcordwell Those are all the same as for me. jupyter outputs to stderr. You should not be having any problems with master.

Could you try the latest commit and let me know what ihaskell install --debug gives you? Also, could you record the output of ./build.sh ihaskell and post it here as a Gist or something?

Thanks.

@sawcordwell
Copy link

Using commit 35e469d I can run ./build.sh ihaskell and ihaskell install without any problems.

However if I open a new Haskell notebook I get a dead kernel and the same message:

ihaskell: main/Main.hs:(204,1)-(298,23): Non-exhaustive patterns in function replyTo

@sawcordwell
Copy link

> ihaskell install --debug
> jupyter notebook
[I 21:35:09.501 NotebookApp] Serving notebooks from local directory: /home/steve/a
[I 21:35:09.501 NotebookApp] 0 active kernels 
[I 21:35:09.501 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 21:35:09.501 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
kf5.kservice.sycoca: Trying to open ksycoca from "/home/steve/.cache/ksycoca5"
[I 21:35:15.012 NotebookApp] Creating new notebook in 
[W 21:35:15.772 NotebookApp] 404 GET /static/components/MathJax/config/Safe.js?rev=2.5.3 (::1) 6.10ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=haskell
[I 21:35:16.359 NotebookApp] Kernel started: 84c46d51-9510-4513-bb2d-88817ddd2e56
Header: {"version":"5.0","msg_id":"9094a611-588a-47cf-8692-7c9413c32c20","session":"A46CA31ECCC64FBD8E947AE354119F2E","msg_type":"kernel_info_request","username":"steve","date":"2015-08-17T21:35:16.571787"}
Content: {}
[W 21:35:16.661 NotebookApp] 404 GET /static/components/codemirror/mode/ihaskell/ihaskell.js (::1) 1.95ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=haskell
Message: KernelInfoReply {header = MessageHeader {identifiers = ["\NUL\244\176\220Q"], parentHeader = Just (MessageHeader {identifiers = ["\NUL\244\176\220Q"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "9094a611-588a-47cf-8692-7c9413c32c20"}, sessionId = UUID {uuidToString = "A46CA31ECCC64FBD8E947AE354119F2E"}, username = "steve", msgType = KernelInfoRequestMessage}), metadata = fromList [], messageId = UUID {uuidToString = "4dfcb122-1b1c-4702-934f-70b92be7e363"}, sessionId = UUID {uuidToString = "A46CA31ECCC64FBD8E947AE354119F2E"}, username = "steve", msgType = KernelInfoReplyMessage}, versionList = [7,8,4], language = "haskell"}
Sent: "{\"language_version\":[7,8,4],\"protocol_version\":\"5.0\",\"language\":\"haskell\"}"
Header: {"msg_type":"kernel_info_request","username":"username","msg_id":"FD99F71043D24185909220B07C63E97A","version":"5.0","session":"A46CA31ECCC64FBD8E947AE354119F2E"}
Content: {}
Message: KernelInfoReply {header = MessageHeader {identifiers = ["A46CA31ECCC64FBD8E947AE354119F2E"], parentHeader = Just (MessageHeader {identifiers = ["A46CA31ECCC64FBD8E947AE354119F2E"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "FD99F71043D24185909220B07C63E97A"}, sessionId = UUID {uuidToString = "A46CA31ECCC64FBD8E947AE354119F2E"}, username = "username", msgType = KernelInfoRequestMessage}), metadata = fromList [], messageId = UUID {uuidToString = "b7af5a7e-8f0b-450b-ae45-f97e45394ab8"}, sessionId = UUID {uuidToString = "A46CA31ECCC64FBD8E947AE354119F2E"}, username = "username", msgType = KernelInfoReplyMessage}, versionList = [7,8,4], language = "haskell"}
Sent: "{\"language_version\":[7,8,4],\"protocol_version\":\"5.0\",\"language\":\"haskell\"}"
Header: {"msg_type":"comm_open","username":"username","msg_id":"37706B45BDCE416C8BBE15FA876972ED","version":"5.0","session":"A46CA31ECCC64FBD8E947AE354119F2E"}
Content: {"target_name":"ipython.widget","data":{"widget_class":"ipywidgets.CommInfo"},"comm_id":"7DFABE863ED54C9D94BE515340C41B72"}
ihaskell: main/Main.hs:(204,1)-(298,23): Non-exhaustive patterns in function replyTo

[I 21:35:19.358 NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel 84c46d51-9510-4513-bb2d-88817ddd2e56 restarted

@jbcoe
Copy link
Author

jbcoe commented Aug 17, 2015

As requested:

`[master *] ~/DEV/ihaskell-git$ find $(jupyter --data-dir) -type f
/Users/jon/Library/Jupyter/kernels/haskell/kernel.js
/Users/jon/Library/Jupyter/kernels/haskell/kernel.json
/Users/jon/Library/Jupyter/kernels/haskell/logo-64x64.png
/Users/jon/Library/Jupyter/kernels/ir/kernel.json
/Users/jon/Library/Jupyter/kernels/ir/logo-64x64.png
/Users/jon/Library/Jupyter/kernels/julia-0.3/kernel.json
/Users/jon/Library/Jupyter/kernels/julia-0.3/logo-32x32.png
/Users/jon/Library/Jupyter/kernels/julia-0.3/logo-64x64.png
/Users/jon/Library/Jupyter/nbsignatures.db
/Users/jon/Library/Jupyter/notebook_secret
/Users/jon/Library/Jupyter/runtime/kernel-3aa3c0cd-f7f0-4218-a34a-11e9555a72ab.json
/Users/jon/Library/Jupyter/runtime/notebook_cookie_secret

[master *] ~/DEV/ihaskell-git$ find $(jupyter --config-dir) -type f
/Users/jon/.jupyter/jupyter_notebook_config.py
/Users/jon/.jupyter/migrated
/Users/jon/.jupyter/tree.json`

I'm using a brand new haskell notebook with nothing in it to do testing.
I have the IPython parallel notebook extension installed.
The kernel output is:

[W 11:46:21.839 NotebookApp] 404 GET /static/components/codemirror/mode/ihaskell/ihaskell.js?v=20150817114616 (::1) 14.96ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=haskell Header: {"username":"jon","msg_type":"kernel_info_request","msg_id":"e8abdf67-b7f9-429a-a678-8bcf2a15a53d","version":"5.0","session":"61D933C3094A4571B5E60A623277BA2F","date":"2015-08-17T11:46:21.597435"} Content: {} Message: KernelInfoReply {header = MessageHeader {identifiers = ["\NULD1\183\130"], parentHeader = Just (MessageHeader {identifiers = ["\NULD1\183\130"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "e8abdf67-b7f9-429a-a678-8bcf2a15a53d"}, sessionId = UUID {uuidToString = "61D933C3094A4571B5E60A623277BA2F"}, username = "jon", msgType = KernelInfoRequestMessage}), metadata = fromList [], messageId = UUID {uuidToString = "0042b623-3a8a-4096-9d11-26404e7b3055"}, sessionId = UUID {uuidToString = "61D933C3094A4571B5E60A623277BA2F"}, username = "jon", msgType = KernelInfoReplyMessage}, versionList = [7,10,2], language = "haskell"} Sent: "{\"language_version\":[7,10,2],\"protocol_version\":\"5.0\",\"language\":\"haskell\"}" Header: {"username":"username","version":"5.0","msg_id":"CA8B9495CDD54D799061976D7ED4534D","msg_type":"kernel_info_request","session":"61D933C3094A4571B5E60A623277BA2F"} Content: {} Message: KernelInfoReply {header = MessageHeader {identifiers = ["61D933C3094A4571B5E60A623277BA2F"], parentHeader = Just (MessageHeader {identifiers = ["61D933C3094A4571B5E60A623277BA2F"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "CA8B9495CDD54D799061976D7ED4534D"}, sessionId = UUID {uuidToString = "61D933C3094A4571B5E60A623277BA2F"}, username = "username", msgType = KernelInfoRequestMessage}), metadata = fromList [], messageId = UUID {uuidToString = "907fb169-da2e-4299-8924-a48a56d374e4"}, sessionId = UUID {uuidToString = "61D933C3094A4571B5E60A623277BA2F"}, username = "username", msgType = KernelInfoReplyMessage}, versionList = [7,10,2], language = "haskell"} Sent: "{\"language_version\":[7,10,2],\"protocol_version\":\"5.0\",\"language\":\"haskell\"}" Header: {"username":"username","version":"5.0","msg_id":"14E1FFEE575C4079AB6CE30F79764623","msg_type":"comm_open","session":"61D933C3094A4571B5E60A623277BA2F"} Content: {"target_name":"ipython.widget","data":{"widget_class":"ipywidgets.CommInfo"},"comm_id":"91AE31005E1A47D4864D1D5293BFDE02"} ihaskell: main/Main.hs:(204,1)-(298,23): Non-exhaustive patterns in function replyTo

@gibiansky
Copy link
Member

@sawcordwell Looks like you're getting the same error as @jbcoe

Do you have any notebook extensions installed by any chance?

@gibiansky
Copy link
Member

Support should now be on Hackage. Let me know if there are more problems. They may still exist – it works for me but definitely needs more testing.

@jbcoe
Copy link
Author

jbcoe commented Aug 23, 2015

Install from scratch using latest github with macos-install.sh now gives me:

The command "ihaskell install" failed. Please check your 'ipython --version'. 3.0 or up is required but it is 4.0.0!

@orome
Copy link

orome commented Aug 23, 2015

There's a problem with formatting (not present in the previous version): #560.

@jbcoe
Copy link
Author

jbcoe commented Aug 23, 2015

Install from cabal now works without problems.

Would input on the github version be useful (testing) or are errors expected?

@gibiansky
Copy link
Member

At the moment master and Hackage are up to date. #560 is the only known issue with 4.0.

@jbcoe
Copy link
Author

jbcoe commented Aug 23, 2015

Hackage works perfectly to me so I'll switch to that for now. Thanks for your fast responses and fixes.

@ghost
Copy link

ghost commented Aug 29, 2015

@gibiansky Installing from master, I get the following:

  • ./build.sh ihaskell
The command "ihaskell install" failed. Please check your 'ipython --version'. 3.0 or up is required. Yours is 4.0.0.
  • ihaskell install --debug
ihaskell: 
Ran commands: 
which jupyter
which ipython
/usr/bin/ipython --version
which /usr/bin/ipython
which ihaskell
withTmpDir
rm -f /tmp/tmpThreadId41804289383846930886
mkdir /tmp/tmpThreadId41804289383846930886
mkdir -p /tmp/tmpThreadId41804289383846930886/haskell
writefile /tmp/tmpThreadId41804289383846930886/haskell/kernel.json
cp /home/alanoth/Code/IHaskell/.cabal-sandbox/share/x86_64-linux-ghc-7.10.1/ihaskell-0.7.0.3/html/kernel.js /tmp/tmpThreadId41804289383846930886/haskell/kernel.js
cp /home/alanoth/Code/IHaskell/.cabal-sandbox/share/x86_64-linux-ghc-7.10.1/ihaskell-0.7.0.3/html/logo-64x64.png /tmp/tmpThreadId41804289383846930886/haskell/logo-64x64.png
which ipython
/usr/bin/ipython kernelspec install --user /tmp/tmpThreadId41804289383846930886/haskell --replace
which /usr/bin/ipython
rm -rf /tmp/tmpThreadId41804289383846930886

Exception: error running: /usr/bin/ipython kernelspec install --user /tmp/tmpThreadId41804289383846930886/haskell --replace
exit status: 1
stderr: Traceback (most recent call last):
  File "/usr/bin/ipython", line 5, in <module>
    start_ipython()
  File "/usr/lib/python3.4/site-packages/IPython/__init__.py", line 118, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 591, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 305, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/IPython/core/application.py", line 386, in initialize
    self.parse_command_line(argv)
  File "/usr/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 300, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 487, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/lib/python3.4/site-packages/traitlets/config/application.py", line 418, in initialize_subcommand
    subapp = import_item(subapp)
  File "/usr/lib/python3.4/site-packages/ipython_genutils/importstring.py", line 31, in import_item
    module = __import__(package, fromlist=[obj])
ImportError: No module named 'jupyter_client'

@wyager
Copy link
Contributor

wyager commented Aug 29, 2015

Also, FWIW, a ghc-pkg unregister of all ihaskell-related packages and then cabal install ihaskell made everything work for me.

@ghost
Copy link

ghost commented Sep 1, 2015

It seems like the error

ImportError: No module named 'jupyter_client'

can be fixed by installing the jupyter package on ArchLinux.

@Jiehong
Copy link

Jiehong commented Sep 1, 2015

@sumitsahrawat If you check the AUR pkg ihaskell, jupyter is listed as a dependency (I had the same issue, and I fixed it at that time like that).

@ghost
Copy link

ghost commented Sep 1, 2015

Yes, I saw that after I pinged you 😄. This should be documented
somewhere, either in the caveats section in the README, or in the
instructions for the AUR package, so I thought I should let you know.

On 01/09/2015, Jiehong notifications@github.com wrote:

@sumitsahrawat If you check the AUR pkg ihaskell, jupyter is listed as a
dependency (I had the same issue, and I fixed it at that time like that).


Reply to this email directly or view it on GitHub:
#553 (comment)

Regards
Sumit Sahrawat

Sophomore - Mathematics and Computing,
Indian Institute of Technology - BHU
Varanasi, India

@ghost
Copy link

ghost commented Sep 1, 2015

@gibiansky I also recieve a error similar to @jbcoe and @sawcordwell:

ihaskell: src/IHaskell/IPython/Message/Parser.hs:121:5-41: Irrefutable pattern failed for pattern Success parsed

Using Debug.Trace.trace, I found that the faliure occurs because IHaskell can't parse:

{
  "data": {
    "widget_class": "ipywidgets.CommInfo"
  },
  "target_name": "ipython.widget",
  "comm_id": "B469D90261CD45C4811BC0C1929C6096"
}

This looks like a message related to ipywidgets, which comes installed by default with IPython on ArchLinux. Does the same happen with you @Jiehong ?

@Jiehong
Copy link

Jiehong commented Sep 1, 2015

@sumitsahrawat I don't get an error, but just an info at startup, very similar to yours:

Unimplemented message: CommOpen {header = MessageHeader {identifiers = ["D4C8A8B07E5C4A40807C0F425E2BB293"], parentHeader = Nothing, metadata = fromList [], messageId = UUID {uuidToString = "E373082637EB405F8B096CDF0394D76F"}, sessionId = UUID {uuidToString = "D4C8A8B07E5C4A40807C0F425E2BB293"}, username = "username", msgType = CommOpenMessage}, commTargetName = "ipython.widget", commUuid = UUID {uuidToString = "274E8F273E24423183DFA9B8CD0E236E"}, commData = Object (fromList [("widget_class",String "ipywidgets.CommInfo")])}

However, it works correctly, so it does not seem blocking here.

@ghost
Copy link

ghost commented Sep 2, 2015

That's strange, as it causes the kernel to die for me whenever I open a new notebook.

@Jiehong
Copy link

Jiehong commented Sep 2, 2015

On Archlinux, we only have GHC 7.10.1, and not 7.10.2 yet, and I patched the stack.yml to limit the resolver to resolver: nightly-2015-08-03 for that purpose.

I don't know about cabal though, but perhaps it may lead you to a solution?

@ghost
Copy link

ghost commented Sep 2, 2015

Everything works fine now, it was some changes I made that were causing the issue.

@orome
Copy link

orome commented Sep 2, 2015

@wyager - Can you list the commands you used to ghc-pkg unregister all IHaskell-related packages? Thx!

@wyager
Copy link
Contributor

wyager commented Sep 2, 2015

Look for anything along the lines of ihaskell or ipython or jupyter and remove it. You can use ghc-pkg list to search. I removed

   ghc-pkg unregister ihaskell-0.6.4.1
   ghc-pkg unregister ihaskell-0.6.4.1 ihaskell-0.6.5.0
   ghc-pkg unregister ihaskell-0.6.4.1 ihaskell-0.6.5.0
   ghc-pkg unregister ihaskell-juicypixels-0.3.0.0
   ghc-pkg unregister ihaskell-aeson-0.3.0.0
   ghc-pkg unregister ihaskell-0.6.5.0
   ghc-pkg unregister ihaskell-0.6.4.1
   ghc-pkg unregister ipython-kernel-0.6.1.

@stared
Copy link

stared commented Dec 25, 2015

I had the same problem with IPython 4.0.1:

The command "ihaskell install" failed. Please check your 'ipython --version'. 3.0 or up is required but it is 4.0.1!

Using $ cabal install ihaskell did solve the problem (actually, with --reinstall).

Just in case, my params:

  • ghc 7.10.3
  • cabal 1.22.6.0
  • OS X 10.11.2 (El Capitan)

@RyanKung
Copy link

Same problem

➜  ~ ihaskell install
Detected Jupyter, but could not parse version number.
(stdout = 4.1.0
, stderr = )
ihaskell:
Ran commands:
which jupyter
which ipython
/usr/local/bin/jupyter --version
which /usr/local/bin/jupyter

Exception: ExitFailure 1

Tried cabal install ihaskell --reinstall and pip install jupyter --upgrade, but not work for me.

➜  ~ cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library

➜  ~ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

OS X 10.11.2 (El Capitan)

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

8 participants