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

前端 未结 24 1067
名媛妹妹
名媛妹妹 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:40

    Anyone looking for running jupyter as sudo, when jupyter installed with virtualenv (without sudo) - this worked for me:

    First verify this is a PATH issue:

    Check if the path returned by which jupyter is covered by the sudo user:

    sudo env | grep ^PATH
    

    (As opposed to the current user: env | grep ^PATH)

    If its not covered - add a soft link from it to one of the covered paths. For ex:

    sudo ln -s /home/user/venv/bin/jupyter /usr/local/bin
    

    Now you sould be able to run:

    sudo jupyter notebook
    

提交回复
热议问题