New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter command not found on mac ox #89

Closed
steinorepearl opened this Issue Oct 7, 2016 · 23 comments

Comments

Projects
None yet
@steinorepearl
Copy link

steinorepearl commented Oct 7, 2016

I just installed jupyter on mac ox el capitan
but bash can't find the command
$ jupyter notebook
-bash: jupyter: command not found

I did the upgrade
$ pip install -U jupyter --user

pip shows the package installed - see below -
so am in mystery as what to setup on my PATH or otherwise set a configuration.

thanks,

pip show jupyter

Metadata-Version: 2.0
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
Installer: pip
License: BSD
Location: /Users//Library/Python/2.7/lib/python/site-packages
Requires: nbconvert, notebook, ipykernel, jupyter-console, ipywidgets, qtconsole
Classifiers:
Intended Audience :: Developers
Intended Audience :: System Administrators
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4

@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Oct 7, 2016

On Linux the directory you need to add to $PATH is ~/.local/bin, but I don't think that works on OSX. Have a hunt around your home directory for a bin folder.

@minrk

This comment has been minimized.

Copy link
Member

minrk commented Oct 7, 2016

I've been meaning to send a patch to pip to show the user where it installed scripts, and warn if it put then not on PATH.

For a --user install like that, it would be ~/Library/Python/X.Y/bin

@steinorepearl

This comment has been minimized.

Copy link
Author

steinorepearl commented Oct 7, 2016

thanks, that was the path I needed.

David Steinore
Pearl Automation
davidsteinore@pearlauto.com
415-259-7079

On Fri, Oct 7, 2016 at 6:40 AM, Min RK notifications@github.com wrote:

I've been meaning to send a patch to pip to show the user where it
installed scripts, and warn if it put then not on PATH.

For a --user install like that, it would be ~/Library/Python/X.Y/bin


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#89 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUQ2cj06ukgy_V0TJ9zj56xBV_GIaJA5ks5qxkvOgaJpZM4KQjRP
.

@takluyver takluyver closed this Oct 7, 2016

@lemioneta

This comment has been minimized.

Copy link

lemioneta commented Nov 4, 2016

I'm having the same issue but I don't understand this advice:


I've been meaning to send a patch to pip to show the user where it installed scripts, and warn if it put then not on PATH.

For a --user install like that, it would be ~/Library/Python/X.Y/bin
@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Nov 4, 2016

There's an environment variable on your system called $PATH, which tells it where to look when you run a command like jupyter in a terminal. You can see this with echo $PATH. The place Jupyter can be installed is not normally on $PATH. On Linux, that's /home/you/.local/bin. On a Mac, it is a folder like /Users/you/Library/Python/3.5/bin.

You can modify PATH in a file like ~/.bash_profile, like this:

PATH=$HOME/.local/bin:$PATH
export PATH
@jimmythongtran

This comment has been minimized.

Copy link

jimmythongtran commented Jul 29, 2017

I need clarification for my configuration. I am using zsh.

My pip show jupyter is:

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: /Users/Mac/Library/Python/2.7/lib/python/site-packages
Requires: ipywidgets, nbconvert, notebook, jupyter-console, qtconsole, ipykernel

My echo $PATH, is:
/Users/Mac/.rvm/gems/ruby-2.0.0-p643/bin:/Users/Mac/.rvm/gems/ruby-2.0.0-p643@global/bin:/Users/Mac/.rvm/rubies/ruby-2.0.0-p643/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/Mac/.rvm/bin

How do I modify ~/.bash_profile? Here is how it currently looks like:


export PS1="Yes, Sir? "

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

# added by Anaconda2 4.4.0 installer
export PATH="/Users/Mac/anaconda/bin:$PATH"

PATH=$HOME/.local/bin:$PATH
export PATH

export PATH=$PATH:./etc/jupyter
@jimmythongtran

This comment has been minimized.

Copy link

jimmythongtran commented Jul 29, 2017

I resolved my own problem by changing the shell for mac to bash.

@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Jul 31, 2017

To clarify, .bash_profile only affects bash. I expect there's a similar file for zsh, but Anaconda probably only automatically modifies the bash file.

@mosesemm

This comment has been minimized.

Copy link

mosesemm commented Aug 13, 2017

after install, it added the path to ~/.profile file...had to run
source ~/.profile
to make the command available

@gor181

This comment has been minimized.

Copy link

gor181 commented Nov 23, 2017

Just cat the bash profile such as:

cat ~/.bash_profile

which gets you:

# added by Anaconda3 5.0.1 installer
export PATH="/Users/goranudosic/anaconda3/bin:$PATH"

And then just copy export PATH="/Users/goranudosic/anaconda3/bin:$PATH" to your ~/.zshrc

@luckyyang

This comment has been minimized.

Copy link

luckyyang commented Dec 11, 2017

sudo rm -rf /Library/Frameworks/Python.framework
rm /usr/local/bin/python3*
brew uninstall python3
brew install python3
which python3
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
which jupyter
jupyter notebook

Resolved my issue by installing python3 with brew instead of downloading python from pkg file.

@sercretalphabets

This comment has been minimized.

Copy link

sercretalphabets commented Dec 22, 2017

sudo rm -rf /Library/Frameworks/Python.framework
rm /usr/local/bin/python3*
brew uninstall python3
brew install python3
which python3
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install jupyter
which jupyter
jupyter notebook

Solved my problem. I could not install jupyther on my Mac with python 2.7

@KyleOh

This comment has been minimized.

Copy link

KyleOh commented Jan 3, 2018

sudo rm -rf /Library/Frameworks/Python.framework
rm /usr/local/bin/python3*
brew uninstall python3
brew install python3
which python3
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install jupyter
which jupyter
jupyter notebook

Also helped me. Thanks to luckyyang!
mine was python3.6 and using sierra 10.12.6

@paulahsan

This comment has been minimized.

Copy link

paulahsan commented Jan 12, 2018

sudo rm -rf /Library/Frameworks/Python.framework
rm /usr/local/bin/python3*
brew uninstall python3
brew install python3
which python3
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install jupyter
which jupyter
jupyter notebook

This helped me. Thanks a lot @luckyyang

@darrenlittlejohn

This comment has been minimized.

Copy link

darrenlittlejohn commented Jan 14, 2018

@gor181 's suggestion solved it for me. Thanks!

@gajjarsaurabh

This comment has been minimized.

Copy link

gajjarsaurabh commented Jan 26, 2018

I was also having the same issue while I was trying to install jupyter using pip command, it showed:
~bash: jupyter: command not found
on executing the command: pip install jupyter

so, I typed these two commands and it worked
python3 -m pip install --upgrade pip
python3 -m pip install jupyter

@eedollmeyer

This comment has been minimized.

Copy link

eedollmeyer commented Jul 21, 2018

@gajjarsaurabh worked for me, thank you!

@lanhongvp

This comment has been minimized.

Copy link

lanhongvp commented Aug 22, 2018

sudo rm -rf /Library/Frameworks/Python.framework
rm /usr/local/bin/python3*
brew uninstall python3
brew install python3
which python3
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install jupyter
which jupyter
jupyter notebook

@luckyyang

This also helps me, thanks a lot.

@Coraxin

This comment has been minimized.

Copy link

Coraxin commented Oct 27, 2018

sudo rm -rf /Library/Frameworks/Python.framework rm /usr/local/bin/python3* brew uninstall python3 brew install python3 which python3 sudo python3 -m pip install --upgrade pip sudo python3 -m pip install jupyter which jupyter jupyter notebook

This helped me, thanks sooooo much! @luckyyang

@d-demirci

This comment has been minimized.

Copy link

d-demirci commented Nov 16, 2018

for those of you (like me) who installed on Mac using installer with just clicking next next finish
then
export PATH=$PATH:/anaconda3/bin
next type jupyter to see if it works.

to make this permanent

nano ~/.bashrc
export PATH=$PATH:/anaconda3/bin
ctl+x. then y.  (save the file and exit)
source ~/.bashrc
@AdrianMcNeese

This comment has been minimized.

Copy link

AdrianMcNeese commented Dec 31, 2018

@luckyyang I already have it installed, but now my issue is re-opening it from the terminal. I tried user/newenv(envioronment name)/bin or user/newenv/bin/activate and trying 'jupyter notebook', but it says that jupyter isn't a command

@luckyyang

This comment has been minimized.

Copy link

luckyyang commented Dec 31, 2018

@AdrianMcNeese Sorry I don't know why you got that error, seems your jupyter is not installed or linked successfully

@awatson31911

This comment has been minimized.

Copy link

awatson31911 commented Jan 12, 2019

@d-demirci
perfect, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment