Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

jupyter_core.command

SOLVED Go to solution
Highlighted

jupyter_core.command

Explorer

I'm trying to install Jupyter using these instructions http://www.cloudera.com/documentation/enterprise/5-6-x/topics/spark_ipython.html.   I've have installed under Anaconda and when I try to run pyspark ( from section 

Starting a Notebook with PySpark) I receive the following error:  

 

$ pyspark

Traceback (most recent call last):

  File "/opt/cloudera/parcels/Anaconda/bin/jupyter", line 4, in <module>

    from jupyter_core.command import main

ImportError: No module named jupyter_core.command

 

Any help is appreciated.

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: jupyter_core.command

Explorer

Solved. I had to:  

$ export PATH= /opt/cloudera/parcels/Anaconda-4.0.0/bin:$PATH

 

I had Python installed before installing Anaconda, and it was clashing.

Re: jupyter_core.command

New Contributor
To solve: $ export PATH= /opt/cloudera/parcels/Anaconda-4.0.0/bin:$PATH had Python installed before installing Anaconda, and it was clashing.
5 REPLIES 5

Re: jupyter_core.command

Explorer

Solved. I had to:  

$ export PATH= /opt/cloudera/parcels/Anaconda-4.0.0/bin:$PATH

 

I had Python installed before installing Anaconda, and it was clashing.

Re: jupyter_core.command

New Contributor
Could any one explain it little more? I am new to python.

Re: jupyter_core.command

Explorer

Can you clarify your question?  Do you mean regarding jupyter or what the core was from?

 

Re: jupyter_core.command

New Contributor
To solve: $ export PATH= /opt/cloudera/parcels/Anaconda-4.0.0/bin:$PATH had Python installed before installing Anaconda, and it was clashing.

Re: jupyter_core.command

New Contributor

I followed the cloudera installation page for anaconda and jupyter and I had the same problem. This worked for an interactive session.  Now I would like to add this to systemd and run this as a service.

 

 

 

cat jupyter-notebook.service
[Unit]
Description=Jupyter notebook

[Service]
Type=simple
PIDFile=/var/run/jupyter-notebook.pid
ExecStartPre=export PATH=/opt/cloudera/parcels/Anaconda-4.0.0/bin:$PATH
ExecStart=/opt/cloudera/parcels/Anaconda/bin/jupyter
User=jptrnb
Group=jptrnb
WorkingDirectory=/home/jptrnb/notebooks

[Install]
WantedBy=multi-user.target

 

Here is the status after a start attempt

 

systemctl status jupyter-notebook -l
● jupyter-notebook.service - Jupyter notebook
Loaded: loaded (/usr/lib/systemd/system/jupyter-notebook.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2016-08-10 16:31:37 PDT; 2s ago
Process: 47560 ExecStart=/opt/cloudera/parcels/Anaconda/bin/jupyter (code=exited, status=1/FAILURE)
Main PID: 47560 (code=exited, status=1/FAILURE)

Aug 10 16:31:37 socbdmn01 systemd[1]: Started Jupyter notebook.
Aug 10 16:31:37 socbdmn01 systemd[1]: Starting Jupyter notebook...
Aug 10 16:31:37 socbdmn01 python[47560]: detected unhandled Python exception in '/opt/cloudera/parcels/Anaconda/bin/jupyter'
Aug 10 16:31:37 socbdmn01 jupyter[47560]: Traceback (most recent call last):
Aug 10 16:31:37 socbdmn01 jupyter[47560]: File "/opt/cloudera/parcels/Anaconda/bin/jupyter", line 4, in <module>
Aug 10 16:31:37 socbdmn01 jupyter[47560]: from jupyter_core.command import main
Aug 10 16:31:37 socbdmn01 jupyter[47560]: ImportError: No module named jupyter_core.command
Aug 10 16:31:37 socbdmn01 systemd[1]: jupyter-notebook.service: main process exited, code=exited, status=1/FAILURE
Aug 10 16:31:37 socbdmn01 systemd[1]: Unit jupyter-notebook.service entered failed state.
Aug 10 16:31:37 socbdmn01 systemd[1]: jupyter-notebook.service failed.