After installing with pip, “jupyter: command not found”

前端 未结 24 1048
名媛妹妹
名媛妹妹 2020-12-04 06:35

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

Ubuntu simply says command not found

相关标签:
24条回答
  • 2020-12-04 06:44

    If you installed Jupyter notebook for Python 2 using 'pip' instead of 'pip3' it might work to run:

    ipython notebook
    
    0 讨论(0)
  • 2020-12-04 06:45

    For my case, jupyter-notebook <name of the notebook> worked

    0 讨论(0)
  • 2020-12-04 06:46

    I had to run "rehash" and then it was able to find the jupyter command

    0 讨论(0)
  • 2020-12-04 06:48

    I compiled python3.7 from the source code, with the following command

    ./configure --prefix=/opt/python3.7.4 --with-ssl
    make
    make install
    

    after pip3.7 install jupyter I found the executable is under /opt/python3.7.4/bin

    check my answer here Missing sqlite3 after Python3 compile to get more detail comping python3.7 and pip under ubuntu14.04

    0 讨论(0)
  • 2020-12-04 06:49

    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.

    0 讨论(0)
  • 2020-12-04 06:49

    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

    0 讨论(0)
提交回复
热议问题