Jupyter Notebook中的Spylon内核引发“无法运行程序“ python”错误”

时间:2019-08-20 15:21:18

标签: apache-spark pyspark jupyter-notebook windows-subsystem-for-linux

我想在Jupyter Notebook中使用spylon-kernel在python和scala中运行spark。我在WSL中安装了python3,spark,Jupyter Notebook和Spylon内核。我将{ "mod": "8976", "machine": { "Comments": [], "machineis": false, "Person": { "Address": null, "Gender": "Female", "LastName": "juhi", "Location": null, "MiddleName": null }, "Specials": [{ "Comments": [], "DDateTime": "2018-11-14T09:40:37", "Contain": [{ "Comments": null, "CID": "256521", "Instance": [{ "ADateTime": null, "ObsertsRIDs": ["11", "12"], "RID": "11", "Type": null }, { "ADateTime": null, "ObsertsRIDs": ["13", "14"], "RID": "12", "Type": null }], "Obserts": [{ "PsnameId": "123-7", "PsName": "gdsa DF", "RstID": "11", "Result": { "Comments": [], "CompletedDateTime": null, "RsltID": "11" }, "Flgs": [ { "Cd": "A1", "Des": "first system", "Type": "null" }, { "Cd": "A2", "Des": "second system", "Type": "null" } ], "Type": null, "Version": 0 }, { "PsnameId": "897-1", "PsName": "sads RT", "RstID": "12", "Result": { "Comments": [], "CompletedDateTime": null, "RsltID": "12" }, "Flgs": [ { "Cd": "B1", "Des": "first system", "Type": "null" }, { "Cd": "B2", "Des": "second system", "Type": "null" }, { "Cd": "B3", "Des": "third system", "Type": "null" } ], "Type": null, "Version": 0 }, { "PsnameId": "897-1", "PsName": "sads RT", "RstID": "13", "Result": { "Comments": [], "CompletedDateTime": null, "RsltID": "13" }, "Flgs": [], "Type": null, "Version": 0 },{ "PsnameId": "891-1", "PsName": "rgst LT", "RstID": "14", "Result": { "Comments": [], "CompletedDateTime": null, "RsltID": "14" }, "Flgs": [], "Type": null, "Version": 0 }], "CAct": null, "Type": null, "Version": 0 }], "Type": null, "Version": 0 }], "Cals": null, "Pals": null, "Type": null, "Version": 0 } } 配置为String server = "my server ip"; DomainBareJid serviceName = JidCreate.domainBareFrom(server); XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder() .setHost(server) method .setUsernameAndPassword("uname", "password") .setPort(5222) .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled) .setXmppDomain(serviceName) //.setHostnameVerifier(verifier) //.setHostAddress(addr) .setDebuggerEnabled(true) .build(); AbstractXMPPConnection conn1 = new XMPPTCPConnection(config); conn1.connect(); if (conn1.isConnected()) { Log.d("XMPP", "Connected"); } conn1.login(); if (conn1.isAuthenticated()) { Log.d("XMPP", "Authenticated"); /* EntityBareJid jid = JidCreate.entityBareFrom("sadegh@localhost"); org.jivesoftware.smack.chat2.Chat chat = ChatManager.getInstanceFor(conn1).chatWith(jid); chat.send("Eureka, I am connected!");*/ } 。我从命令行在pyspark中运行了以下测试代码,效果很好。

org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: '157.230.160.183:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for 157.230.160.183.   IN  A yielded an error response NX_DOMAIN, '157.230.160.183:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for 157.230.160.183.   IN  AAAA yielded an error response NX_DOMAIN
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:619)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:902)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:383)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at com.example.portalejabberddemo.MainActivity.test(MainActivity.java:94)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at com.example.portalejabberddemo.MainActivity.access$000(MainActivity.java:33)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at com.example.portalejabberddemo.MainActivity$1.doInBackground(MainActivity.java:57)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at com.example.portalejabberddemo.MainActivity$1.doInBackground(MainActivity.java:53)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:295)
08-20 20:42:00.447 27072-27107/com.example.portalejabberddemo W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
08-20 20:42:00.448 27072-27107/com.example.portalejabberddemo W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
08-20 20:42:00.448 27072-27107/com.example.portalejabberddemo W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
08-20 20:42:00.448 27072-27107/com.example.portalejabberddemo W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
08-20 20:42:00.448 27072-27107/com.example.portalejabberddemo W/System.err:     at java.lang.Thread.run(Thread.java:818)

但是当我在pypy笔记本中使用python magic elements在spylon内核中运行相同的代码时,它引发了错误

TYPE, PUBLIC :: RotationMatrixClass
  PRIVATE
#ifdef isGnu
  ! this crashes the Intel compiler
  REAL, DIMENSION(3,3) :: elements = reshape( (/1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 /), (/ 3,3/))
#else
  ! this does not compile on gfortran
  REAL,DIMENSION(3,3) :: elements = [[1.0, 0.0, 0.0],[0.0, 1.0, 0.0], [0.0, 1.0, 0.0]]
#endif


END TYPE

由于Spark可以找到我的python3,所以我怀疑spylon-kernel无法找到。我该如何解决?

0 个答案:

没有答案