This repository was archived by the owner on Mar 26, 2019. It is now read-only.
This repository was archived by the owner on Mar 26, 2019. It is now read-only.
Zsh: command not found: jupyter #317
Closed
Description
- OS: macOS High Sierra 10.13.3 Beta (17D29a)
- iTerm, zsh
After the python@2
rename by homebrew, jupyter
(and also jupyter lab
) doesn't work.
▶ jupyter
zsh: command not found: jupyter
I have done brew upgrade
, installed and reinstalled python3
and python2
several times, created symlinks but still jupyter
, jupyterlab
don't work after the rename and migrations.
I use pip3
to install jupyter
, not Anaconda.
Also, this is my $PATH
:
▶ echo $PATH
/usr/local/Cellar/gcc/7.3.0:/usr/local/opt/python@2/libexec/bin:/usr/local/Cellar/python/3.6.4_3:/usr/local/lib:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/go/bin:/opt/X11/bin:/usr/local/opt/python/libexec/bin:/Users/sudoankit/bin:/usr/local/Cellar
More details:
▶ which python3
/usr/local/bin/python3
▶ which python
/usr/local/opt/python@2/libexec/bin/python
▶ pip3 show jupyter
Name: jupyter
Version: 1.0.0
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: jupyter@googlegroups.org
License: BSD
Location: /usr/local/lib/python3.6/site-packages
Requires: jupyter-console, ipywidgets, nbconvert, notebook, qtconsole, ipykernel
Note:
▶ ipython notebook
[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
[I 12:59:59.770 NotebookApp] JupyterLab beta preview extension loaded from /usr/local/lib/python3.6/site-packages/jupyterlab
[I 12:59:59.770 NotebookApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 12:59:59.779 NotebookApp] Serving notebooks from local directory: /Users/sudoankit
This works.
Activity
sudoankit commentedon Mar 8, 2018
So I found a workaround.
Installed
Jupyter
usingbrew
:brew install jupyter
Now,
Problem fixed but still questions hover!
Jupyter
's path?I don't want it to use system
python 2.7
, I want it to usebrew
'spython3
.notebook
version is5.0.0
but if you use
pip3 show notebook
it's 5.4. ( if I could changeJupyter
's path to point atpython3
I think this would get solved! )Also minor hiccups:
If I do:
If I use
pip2
( asbrew
tells me: )Weird.
takluyver commentedon Mar 8, 2018
The bit you're looking at depends on the Python installation that it's running on. It looks like Homebrew has installed Jupyter on Python 2.7. I don't know if there's a way to tell Homebrew which Python to use, but the canonical way is to install it with pip:
path/to/python3 -m pip install jupyter
.sudoankit commentedon Mar 8, 2018
It's strange
brew
is phasing awaypython2
slowly but still installs Jupyter on 2.7.The canonical way (as I mention in the first post of this thread )
python3 -m pip install jupyter
isn't working.……and still I get:
takluyver commentedon Mar 8, 2018
Try uninstalling Jupyter with every tool that might have installed it, and then installing again using pip. If some files have been removed or overwritten, pip won't necessarily notice that it should rewrite them.
sudoankit commentedon Mar 8, 2018
I finally fixed this by,
jupyter
usingbrew
,brew uninstall jupyter
.pip3 install jupyter jupyterlab
That's it!
Everything is fine now. Thanks! @takluyver
ckeshava commentedon Jun 8, 2018
I had installed via the Anaconda installation. Anaconda will modify the $PATH at the end of
~/.bashrc
file. I was facing the same issue. I added this line at the end of~/.zshrc
file:export PATH="/home/chenna/anaconda3/bin:$PATH"
source ~/.zshrc
This worked for me.
monktastic commentedon Jul 20, 2018
I'm having a similar problem. Couldn't get
pip-purge
to work, but explicitly pip uinstalled everything. Afterpip3 install jupyter
, zsh still can't find it (because it doesn't exist).dennisja commentedon Sep 17, 2018
@chennakeshava1998 solution works and seems to be the best.
jlave-dose commentedon Nov 8, 2018
If you installed Jupyter via the Anaconda graphical installer, Anaconda writes the following into your
~/.bash_profile
:Just copy and paste that to the end of
~/.zshrc
and runsource .zshrc
. Then zsh will look in your Anaconda path any time a shell is opened.