I keep getting this error 'notebook' is not a Jupyter command when trying to make a launcher (in Linux Mint mate panel) for jupyter notebook. The command I put in the launcher is /home/fehiepsi/miniconda3/bin/jupyter notebook. If I replace jupyter by ipython, then things go well. So I guess that the command jupyter notebook is different to ipython notebook, isn't it?
I install ipython notebook by using conda and just install jupyter today (of course, I have updated all packages). Could anyone please give me some suggestions?
Additional informaltion: I just run jupyter notebook well in the terminal, so the problem might lie on the launcher. But I get confused because in the launcher, the command ipython notebook runs well.
@fehiepsi What do you get from conda list?
Here is my result of conda list
# packages in environment at /home/fehiepsi/miniconda3:
#
certifi 14.05.14 py34_0
conda 3.17.0 py34_0
conda-env 2.4.2 py34_0
decorator 4.0.2 py34_0
fontconfig 2.11.1 4
freetype 2.5.2 2
ipykernel 4.0.3 py34_0
ipython 4.0.0 py34_0
ipython-genutils 0.1.0 <pip>
ipython-notebook 4.0.4 py34_0
ipython_genutils 0.1.0 py34_0
ipywidgets 4.0.2 py34_0
jinja2 2.8 py34_0
jsonschema 2.4.0 py34_0
jupyter 1.0.0 py34_0
jupyter-client 4.0.0 <pip>
jupyter-console 4.0.2 <pip>
jupyter-core 4.0.4 <pip>
jupyter_client 4.0.0 py34_0
jupyter_console 4.0.2 py34_0
jupyter_core 4.0.4 py34_0
libgfortran 1.0 0
libpng 1.6.17 0
libsodium 0.4.5 0
libxml2 2.9.2 0
markupsafe 0.23 py34_0
matplotlib 1.4.3 np19py34_2
mistune 0.7.1 py34_0
nbconvert 4.0.0 py34_0
nbformat 4.0.0 py34_0
notebook 4.0.4 py34_0
numpy 1.9.2 py34_1
openblas 0.2.14 1
openssl 1.0.1k 1
path.py 7.6.1 py34_0
pexpect 3.3 py34_0
pickleshare 0.5 py34_0
pip 7.1.2 py34_0
ptyprocess 0.4 py34_0
pycosat 0.6.1 py34_0
pygments 2.0.2 py34_0
pyparsing 2.0.3 py34_0
pyqt 4.11.3 py34_1
python 3.4.3 1
python-dateutil 2.4.2 py34_0
pytz 2015.4 py34_0
pyyaml 3.11 py34_1
pyzmq 14.7.0 py34_0
qt 4.8.6 3
qtconsole 4.0.1 py34_0
readline 6.2 2
requests 2.7.0 py34_0
setuptools 18.1 py34_0
simplegeneric 0.8.1 py34_0
sip 4.16.5 py34_0
six 1.9.0 py34_0
sqlite 3.8.4.1 1
system 5.8 2
terminado 0.5 py34_0
tk 8.5.18 0
tornado 4.2.1 py34_0
traitlets 4.0.0 py34_0
wheel 0.24.0 py34_0
xz 5.0.5 0
yaml 0.1.6 0
zeromq 4.0.5 0
zlib 1.2.8 0
The result for which jupyter and which ipython:
fehiepsi@binhyen:~$ which jupyter
/home/fehiepsi/miniconda3/bin/jupyter
fehiepsi@binhyen:~$ which ipython
/home/fehiepsi/miniconda3/bin/ipython
By the way, except the command jupyter notebook which gives the above error, the other commands such that jupyter-notebook or ipython notebook run fine. So I think that this is just a small issue and can be fixed.
I bumped into this issue during a PR to IJulia. The issue can be reproduced by the following julia code
Pkg.clone("Conda")
Pkg.build("Conda")
using Conda
Conda.add("jupyter")
run(`$(joinpath(Conda.SCRIPTDIR,"jupyter")) notebook`) # errors
run(`$(joinpath(Conda.SCRIPTDIR,"jupyter")) kernelspec --version`) # do also error
Some more info I can only reproduce it on Windows. But I have seen it on travis at this commit https://travis-ci.org/Luthaf/Conda.jl/builds/81279978
@fehiepsi do you still get this if you upgrade jupyter_core to 4.0.6? @dhoegh I think I know what's up on Travis, it's probably that jupyter-kernelspec isn't on PATH, and we should be able to fix that by ensuring that the dir containing jupyter is on PATH when dispatching to subcommands.
I ran into this issue using a private miniconda distribution in the Conda package for julia. jupyter or jupyter-kernelspec was not in PATH but jupyter was referenced to with an absolute path to the jupyter executable. See https://github.com/JuliaLang/IJulia.jl/blob/855235f2ec50de2e7c792474ac56780666135747/deps/build.jl#L36.
Yup, that should be fixable pretty easily. I've got a working fix right now, I just need to make sure it doesn't do the wrong thing when python -m is used.
@dhoegh I opened jupyter/jupyter_core#62 which should fix that case. It's possible the Windows issue is the same.
@minrk I have update jupyter_core to version 4.0.6 but still get the same issue. The command with full path fails in terminal:
fehiepsi@binhyen:~$ /home/fehiepsi/miniconda3/envs/notebook/bin/jupyter notebook
jupyter: 'notebook' is not a Jupyter command
@fehiepsi that looks like it's the same PATH issue @dhoegh is seeing and is fixed by jupyter/jupyter_core#62.
@minrk - are you okay with closing this?
On windows, using python 2.7, after installing jupyter via pip:
@stephane-martin pip list?
@stephane-martin : me too with the newest version of anaconda; please wait for jupyter 4.1 I think :)
# packages in environment at /home/fehiepsi/miniconda3/envs/notebook:
#
certifi 2015.9.6.2 py35_0
decorator 4.0.4 py35_0
fontconfig 2.11.1 5
freetype 2.5.5 0
ipykernel 4.1.1 py35_0
ipython 4.0.0 py35_0
ipython-genutils 0.1.0 <pip>
ipython_genutils 0.1.0 py35_0
ipywidgets 4.1.0 py35_0
jinja2 2.8 py35_0
jsonschema 2.4.0 py35_0
jupyter 1.0.0 py35_0
jupyter-client 4.1.1 <pip>
jupyter-console 4.0.3 <pip>
jupyter-core 4.0.6 <pip>
jupyter_client 4.1.1 py35_0
jupyter_console 4.0.3 py35_0
jupyter_core 4.0.6 py35_0
libgfortran 1.0 0
libpng 1.6.17 0
libsodium 1.0.3 0
libxml2 2.9.2 0
llvmlite 0.8.0 py35_0
markupsafe 0.23 py35_0
matplotlib 1.4.3 np110py35_2
mistune 0.7.1 py35_0
nbconvert 4.0.0 py35_0
nbformat 4.0.1 py35_0
notebook 4.0.6 py35_0
numba 0.22.1 np110py35_0
numpy 1.10.1 py35_0
openblas 0.2.14 3
openssl 1.0.2d 0
path.py 8.1.2 py35_0
pexpect 3.3 py35_0
pickleshare 0.5 py35_0
pip 7.1.2 py35_0
ptyprocess 0.5 py35_0
pygments 2.0.2 py35_0
pyparsing 2.0.3 py35_0
pyqt 4.11.4 py35_0
python 3.5.0 1
python-dateutil 2.4.2 py35_0
pytz 2015.7 py35_0
pyzmq 14.7.0 py35_1
qt 4.8.7 0
qtconsole 4.1.0 py35_0
readline 6.2 2
setuptools 18.4 py35_0
simplegeneric 0.8.1 py35_0
sip 4.16.9 py35_0
six 1.10.0 py35_0
sqlite 3.8.4.1 1
terminado 0.5 py35_1
tk 8.5.18 0
tornado 4.2.1 py35_1
traitlets 4.0.0 py35_0
wheel 0.26.0 py35_1
xz 5.0.5 0
zeromq 4.1.3 0
zlib 1.2.8 0
I got the same issue. Python 2.7, Mac OSX, python27, iPython, jupyter, jupiter_core all installed from pip. iPython notebook command is fine. Python is installed from home-brew.
I don't know why jupyter wants to dictate iPython so aggressively, since iPython notebook keeps giving me feedback saying "this command is going to be dropped " but the issue still existed and doesn't match what jupyter documentation.
Does jupyter-notebook (with a hyphen instead of a space) work?
@Hualin where do you find jupyter-notebook? What do you get from pip list?
If you are using Python from Python.org, make sure that you have /Library/Frameworks/Python.framework/Versions/2.7/bin on your PATH, since that's where pip will put executables if you are using that Python distribution.
@minrk python27 is installed from home-brew, all other python package if possible are all installed from pip. iPython Notebook and all other cmds work fine, without any problem. Jupyter is installed from pip and I followed the docs exactly, not sure any thing I should do apart from follow the docs otherwise the docs is invalid in the first place.
I am sure pip list get all the jupyter package I should have to fire jupyter notebook. jupyter-core and jupyter-notebook is indeed in the path you mentioned but not in the main path where I fire up all the cmd, which is in usr/local/bin, the routine I follow from Home-brew.
the problem is fixed by adding symbolic link from python frame path to usr/local/bin, which I am afraid I might have to do it every time I upgrade jupyter.
many thanks for your reply.
while the problem is why jupyter is in usr/local/bin but not jupiter-notebook? very strange. it is however kind of confusing for me from the beginning of Jupyter, that I am not sure how many package I should install with prefix of Jupyter, like Jupyter-kernel, jupyter-XXX about 5 -10 packages in PyPI and the docs in early stage is very much brief.
I think it is very personal feeling for me, that I am not a fan of Jupyter, from its early confusion, every time iPython pop up the message of saying the notebook is going to be dropped, and this tiny struggle. The project is very ambitious and progress very fast and sometimes aggressively which is the reason why I don't like it. not everybody appreciates to understand the glorious future vision of Jupyter and why not just keep iPython notebook unaffected?
I'm equally puzzled why your jupyter command is installed in a different place from jupyter-notebook. As far as I know, they're both specified in the same way and installed by pip, so they should both end up in the same place.
You probably don't need to worry about the different jupyter- packages: installing the top level jupyter package should automatically get all the bits you need.
why not just keep iPython notebook unaffected?
If you want to keep IPython notebook unaffected, you can pin IPython to the last version with the notebook:
pip install "ipython<4"
I'm sorry the transition is not going well for you. It is _extremely_ strange that the jupyter-notebook executable isn't in the same directory as the jupyter executable. The location of these files is up to pip, not the packages. Do you find a jupyter-notebook executable anywhere? Perhaps in ~/Library/Python/2.7/bin or ~/.local?
I would expect reinstalling the notebook to fix this:
pip uninstall notebook
pip install --upgrade notebook
But I'm not sure how the file went missing in the first place.
I am also having some odd issues as of a recent Jupyter install using pip3 on OS X 10.11. jupyter is not found anywhere in my path, although it is listed in the python 3.5 site-packages dir.
jupyter-notebook seems to work fine on its own. As an aside, I cannot use it as an Apache PySpark driver. If I try to set PYSPARK_DRIVER_PYTHON=jupyter-notebook, I get an error :
[C 10:08:57.048 NotebookApp] No such file or directory: /Users/damien/work_folder/notebook
while the old setting PYSPARK_DRIVER_PYTHON=ipython with PYSPARK_DRIVER_PYTHON_OPTS='notebook' works perfectly.
@damienstanton the jupyter command is provided by the package jupyter_core. Can you try uninstalling and reinstalling that to see if it fixes things?
@takluyver Just to clarify, the uninstall/reinstall commands would be:
pip3 uninstall jupyter
pip3 install jupyter
I was suggesting uninstalling and installing jupyter_core, not jupyter.
The jupyter_core package provides the jupyter command. All of the other Jupyter packages depend on this.
The jupyter package contains no code, but it depends on all of the jupyter pieces, so it's a quick way for people to install everything. However, I don't think uninstalling it with pip will affect anything else, so it probably won't fix a broken installation.
@takluyver Thanks. Quick question: if one does pip3 uninstall jupyter, doesn't it uninstall everything, including jupyter_core?
Then, pip3 install --force-reinstall jupyter would reinstall all including jupyter_core. Correct or not?
I don't think pip uninstalls dependencies, so if you uninstall jupyter, I don't think that will remove anything else. I could be wrong, though.
--force-reinstall may be enough to reinstall everything, so long as that works on dependencies as well.
I also had the issue on osx with homebrew python installation, where pip install jupyter would not put jupyter-notebook in /usr/local/bin , while correctly installing other components.
The following, as recommended above, resolved the issue:
pip uninstall notebook
pip install --upgrade notebook
I got mine working by deleting the Library/Caches/pip/... entries for Jupyter, then running pip3 uninstall jupyter followed by pip3 install --upgrade jupyter.
I believe the issue had something to do with a mismatched jupyter_core in my pip cache.
I had the same problem on a Mac OSX el capitan using python3.5 installed from python.org. Reinstalling did not work.
My solution, which is not perfect, was to extend PATH to /Library/Frameworks/Python.framework/Versions/3.5/bin/. It seems that jupyter notebook requires the jupyter-notebook binary to be on the executables path.
I am having the same issue on a fresh install on Arch Linux. I installed jupyter 4.1.0 from the repositories and the 'notebook' subcommand is not recognized.
@juliohm can you do which jupyter and see if there is a jupyter-notebook in the same location?
@takluyver there is no jupyter-notebook in the same location.
I don't know how Arch installation works, but using pip or conda, there are three packages involved:
jupyter is a ~empty package which depends on all the real Jupyter packagesnotebook contains the jupyter-notebook script which launches the notebook application.jupyter_core contains the jupyter script, which turns the subcommand jupyter notebook into a call to jupyter-notebook.Is it possible that you have only got the last of those installed instead of all three?
@takluyver you were right, I needed to install another package jupyter-notebook. Everything is working now. Thank you.
@mgrani I have a similar setup, but I moved jupyter-notebook to the /usr/local/bin directory.
Can anyone help me debug this? I got the same error jupyter: 'notebook' is not a Jupyter command
which jupyter I got /usr/local/bin/jupyter
which jupyter-notebook I got jupyter-notebook not found
I did pip3 uninstall notebook and pip3 install --upgrade notebook.
The last line after I did pip3 install --upgrade notebook is Successfully installed notebook-4.2.3, but I still got the error.
Thanks
@coldray i'm guesting you have a mac? try moving the file jupyter-notebook to /usr/local/bin/. So that there is the jupyter and the jupyter-notebook files in that directory. I think the jupyter file needs the jupyter-notebook file to run the command jupyter notebook. I think the pip3 command may have installed the jupyter-notebook in the wrong place. I use the command pip3 as well.
Or if that doesn't fix the problem try adding something like: /Library/Frameworks/Python.framework/Versions/3.2/bin to your PATH. Note that 3.2 is the python version I have.
Had this issue on a Mac running Python 3 in a virtual env. Reinstalling notebook as recommended above resolved the issue.
$ pip uninstall notebook
$ pip install --upgrade notebook
Most helpful comment
Had this issue on a Mac running Python 3 in a virtual env. Reinstalling notebook as recommended above resolved the issue.
$ pip uninstall notebook
$ pip install --upgrade notebook