env: ‘jupyter’: No such file or directory

Viewed 7458

I'm trying to apply this tuto in my ubuntu, and this is what i did:

1-install spark 2.2.... (pyspark)+ java(1.8) + anaconda (Python2.7)

2-edit the .bachrc (adding 2 lines):

export PYSPARK_DRIVER_PYTHON=jupyter

export PYSPARK_DRIVER_PYTHON_OPTS="notebook"

3-lanch Pyspark: $sudo Pyspark it works fine

4-lanch jupyter: $sudo jupyther notebook it works fine

when i run PYSPARK_DRIVER_PYTHON="jupyter" PYSPARK_DRIVER_PYTHON_OPTS="notebook" spark-2.2.0-bin-hadoop2.7/bin/pyspark the command to launch Pyspark with Jupyter notebook i get this:

env: ‘jupyter’: No such file or directory

what should i do ??

4 Answers

When i type which jupyter not thing is displayed on my terminal so i fixed the issue by Uninstalling anaconda and installing it again from anaconda official site, now it works fine!!!

Shell cannot find juptyerin your environment in any of the directories listed in $PATH. If you have followed the tutorial and installed Anaconda distribution, you should have added the path to $PATH in .bashrc:

echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bashrc 

Also check that jupyter is present in ~/anaconda/bin". Note that ~ refers to $HOME so you should adapt the path if your installation is located elsewhere

When I got this error, I uninstalled anaconda by removing the anaconda directory. I then installed it from the anaconda website and updated my bash profile to reflect on the new location of anaconda in my "/" (root) directory. Then it worked fine.

I tried the solution by MaFF and it worked --- the installation may have failed to add the PATH to the env. so I manually added it as suggested by MaFF, uninstall and reinstall is not necessary.

Related