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

Erreur au lancement de jupyter, Bonjour,


Erreur au lancement de jupyter, Bonjour,

New Contributor


J'ai suivi à la lettre le tutorial pour installer et lancer jupyter et au lancement du script .""

j'ai une erreur de syntaxe dans le fichier de configuration, que j'ai pourtant copié depuis le guide :



#!/bin/bash source


IPYTHON_OPTS="notebook --port 8889 --notebook-dir='/usr/hdp/current/spark-client/' --ip='*' --no-browser" pyspark


Erreur obtenue : invalid syntax, avec la flèche pointant sur 'pyspark'

[E 14:02:17.608 NotebookApp] Exception while loading config file /root/.jupyter/

Traceback (most recent call last):

File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/traitlets/conf ig/", line 534,

in _load_config_files config = loader.load_config()

File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/traitlets/conf ig/", line 458,

in load_config self._read_file_as_dict()

File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/traitlets/conf ig/", line 490,

in _read_file_as_dict py3compat.execfile(conf_filename, namespace)

File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/ipython_genuti ls/", line 288,

in execfile builtin_mod.execfile(filename, *where)

File "/root/.jupyter/", line 566

IPYTHON_OPTS="notebook --port 8889 --notebook-dir='/usr/hdp/current/spar k-client/' --ip='*' --no-browser" pyspark


SyntaxError: invalid syntax


Pierre Bouillaguet



Re: Erreur au lancement de jupyter, Bonjour,

@Pierre Bouillaguet, it looks like there are misplaced quotes in the IPYTHON_OPTS variable. 'pyspark' is on the outside of all the quotes.

There's also a space in spark-client ("spar k-client") -- this could be an additional problem.


Re: Erreur au lancement de jupyter, Bonjour,

New Contributor


Thanks for your advise. Unfortunately, i'm still stuck on it.

The space was a copy-paste mistake when opening this message.

In the configuration file .py, the content of IPYTHON_OPTS is :

"notebook --port 8889 --notebook-dir='/usr/hdp/current/spark-client/' --ip='*' --no-browser"

and command pyspark is outside the double quotes.

As you can imagne, i'm a newcomer following the instructions in the tutorial, so i don't really understand why setting this variable in the .py file and also in the script to run it.

if i type directly the commands from the .py file in the invite (as root), it starts Sparks but inside the shell screen, not through the port 8889. (i already opened port 8080 for ambari, so NAT is not the origin of the problem i think ?)

If you can just give me the line to have in the .py file if i typed something wrong in it and the line to type in sh file ...

Kind Regards


Re: Erreur au lancement de jupyter, Bonjour,

Hi @Pierre Bouillaguet, can you try to put "pyspark" on a new line in the script, below the IPYTHON_OPTS=... block. It seems that when on the same line, pyspark is not aware of the new IPYTHON_OPTS value.


Re: Erreur au lancement de jupyter, Bonjour,

New Contributor

Hi Pedrag,

It seems there is a double problem :

- environment path : the system could not run 'pyspark', i may have missed something in a profile

- content of the IPYTHON_OPTS was not taken into account (?)

I replaced it partially in the .py file by using "c = get_config( )" and then force the different options (ip, port, dir) with c.NotebookApp.

I suppose it is not the best way to do it and i'm going to try with your solution.

Thanks a lot for your help.

Don't have an account?
Coming from Hortonworks? Activate your account here