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

Python kernel is not initializing all PySpark modules (e.g. PySpark ML) #56

Closed
lresende opened this issue Jul 6, 2017 · 5 comments
Closed

Comments

@lresende
Copy link
Member

lresende commented Jul 6, 2017

Running sample SystemML notebook

/opt/anaconda2/lib/python2.7/site-packages/systemml/mlcontext.py in ()
30 import pyspark.mllib.common
31 except ImportError:
---> 32 raise ImportError('Unable to import pyspark. Hint: Make sure you are running with PySpark.')
33

@lresende lresende added this to the Sprint 5 milestone Jul 6, 2017
@ckadner
Copy link
Collaborator

ckadner commented Jul 6, 2017

@lresende -- let me take a look at this. When I created the launcher script I tried to keep the initialization code to a minimum. There may be more we want to do here.

@ckadner
Copy link
Collaborator

ckadner commented Jul 6, 2017

took a quick look at the SystemML code which is (re-)raising the ImportError:

https://github.com/apache/systemml/blob/master/src/main/python/systemml/mlcontext.py#L31

try:
    import py4j.java_gateway
    from py4j.java_gateway import JavaObject
    from pyspark import SparkContext
    import pyspark.mllib.common
except ImportError:
    raise ImportError('Unable to import `pyspark`. Hint: Make sure you are running with PySpark.')

@lresende -- is that the code you ran?

the above imports work fine in my environment (without Anaconda)

@lresende
Copy link
Member Author

lresende commented Jul 6, 2017

I am running this:
https://github.com/apache/systemml/blob/master/samples/jupyter-notebooks/SystemML-PySpark-Recommendation-Demo.ipynb

With the addition of a initial line to install SystemML:
!pip install systemml

And i only have anaconda on master, not on nodes where the iPython is installed

@akchinSTC akchinSTC modified the milestones: Backlog, Sprint 5 Jul 13, 2017
@ckadner
Copy link
Collaborator

ckadner commented Jul 13, 2017

@lresende -- can you still reproduce this issue?

@lresende lresende assigned lresende and unassigned ckadner Aug 1, 2017
@lresende lresende modified the milestones: Sprint 7, Backlog Aug 1, 2017
@kevin-bates kevin-bates modified the milestones: Sprint 8, Sprint 7 Aug 29, 2017
@lresende lresende modified the milestones: Sprint 9, Sprint 8 Aug 29, 2017
@kevin-bates kevin-bates modified the milestones: Sprint 9, Sprint 10 Sep 15, 2017
@lresende
Copy link
Member Author

Properly updated Python and R kernelspec with required environment variables

@kevin-bates kevin-bates modified the milestones: Sprint 10, v0.6 Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants