Support Questions
Find answers, ask questions, and share your expertise
Alert: Please see the Cloudera blog for information on the Cloudera Response to CVE-2021-4428

Hi all, Ifollowed the tutorial to install jupyter on Hortonworks sandbox HDP 2.4. I have an issue when executing ./ I get an error that says "NameError: name 'source' is not defined". How can I fix it?


Below is the details of the message from the terminal:

[root@sandbox ~]# ./

[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions. [TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future

[E 09:18:57.055 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/config/", line 534, in _load_config_files

config = loader.load_config()

File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/traitlets/config/", line 458, in load_config


File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/traitlets/config/", line 490, in _read_file_as_dict

py3compat.execfile(conf_filename, namespace)

File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/ipython_genutils/", line 288, in execfile

builtin_mod.execfile(filename, *where)

File "/root/.jupyter/", line 2, in <module>

source /opt/rh/python27/enable

NameError: name 'source' is not defined

[I 09:18:57.081 NotebookApp] The port 8888 is already in use, trying another port.

[I 09:18:57.091 NotebookApp] Serving notebooks from local directory: /root

[I 09:18:57.091 NotebookApp] 0 active kernels

[I 09:18:57.091 NotebookApp] The Jupyter Notebook is running at: http://localhost:8889/

[I 09:18:57.091 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[W 09:18:57.092 NotebookApp] No web browser found: could not locate runnable browser.



Since there are multiple versions of Python installed on the Sandbox, this command chooses which one to use:

source /opt/rh/python27/enable

It is trying to locate an installation of Python 2.7, which is supposed to be located in the referenced directory, at least for RedHat or CentOS systems. Can you make sure you ran all the pre-requisite installs, starting with this command to install python:

yum install python27


Hi Paul, thanks for your answer. Yes I have installed python correctly and I see the 'enable' script in the directory above. My guess is that it did not recognize the name 'source' as a command. Any help?


Hi paul after installation jupyter asks for password what will be the password as I didn't set any password couldn't start jupyter notebook. Can you please help me?