After installing with pip, “jupyter: command not f

2019-01-30 05:59发布

After installing with pip install jupyter, terminal still cannot find jupyter notebook.

Ubuntu simply says command not found. Similar with ipython. Did pip not get install properly or something? How does Ubuntu know where to look for executables installed with pip?

14条回答
Lonely孤独者°
2楼-- · 2019-01-30 06:15

If jupyter run by this command:

~/.local/bin/jupyter-notebook

simply run this command in terminal

 export PATH=~/.local/bin:$PATH
查看更多
唯我独甜
3楼-- · 2019-01-30 06:16

you did not log out and log in ? It should be on your path to execute. If not, pip installed executables in .local, so in a terminal:

 ~/.local/bin/jupyter-notebook

should start notebook

查看更多
孤傲高冷的网名
4楼-- · 2019-01-30 06:18

On Mac OS you need to export ~/.local/bin inside your $PATH variable.

# Edit the bash profile:
$ vim ~/.bash_profile

# Add this line inside ~/.bash_profile:
export PATH=$PATH:~/.local/bin

# Update the source:
$ source ~/.bash_profile

# Open Jupyter:
$ jupyter notebook
查看更多
贪生不怕死
5楼-- · 2019-01-30 06:19

To be able to run jupyter notebook from terminal, you need to make sure that ~/.local/bin is in your path.

Do this by running export PATH=$PATH:~/.local/bin for your current session, or adding that line to the end of ~/.bashrc to make your changes last for future sessions (e.g. by using nano ~/.bashrc). If you edit ~/.bashrc you will need to log out and log back in to make see your changes take effect.

查看更多
甜甜的少女心
6楼-- · 2019-01-30 06:21

The only thing that worked me is to export to PATH the Python version that is related to the pip3 of course :) (after a lot of struggling) just run:

which pip3

you should get something like (in Mac):

/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3

Now run:

export PATH=/Library/Python/3.6/bin:$PATH

If it works for you :) just add it to your bashrc or zshrc

查看更多
唯我独甜
7楼-- · 2019-01-30 06:23

Execute this in Terminal

export PATH=~/anaconda3/bin:$PATH

Worked for me on Ubuntu 16.10, Python3, Anaconda3

UPDATE

Add path in your ~/.bashrc or ~/.zshrc(if you are using zsh bash) file

vi ~/.bashrc

add the below line to the file

PATH=~/path/to/anaconda:$PATH

Close the file with

esc + : + wq
查看更多
登录 后发表回答