No matter how many times you try restarting the kernel when the notebook now is located in a different directory. However, completely shutting down the kernel and attaching a new one will then change the working directory to the present location of the notebook itself.
Jupyter doesn't load or doesn't work in the browserTry disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.
It seems to me as though the installation has messed up somehow. Try running:
# For Python 2
pip install --upgrade --force-reinstall --no-cache-dir jupyter
# For Python 3
pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
This should reinstall everything from PyPi. This should solve the problem as I think running pip install "ipython[notebook]"
messed things up.
For me the issue was that the command jupyter notebook
changed to jupyter-notebook
after installation.
If that doesn't work, try python -m notebook
, and if it opens, close it, then
export PATH=$PATH:~/.local/bin/
, then refresh your path by opening a new terminal, and try jupyter notebook
again.
And finally, if that doesn't work, take a look at vim /usr/local/bin/jupyter-notebook
, vim /usr/local/bin/jupyter
, vim /usr/local/bin/jupyter-lab
(if you have JupyterLab) and edit the #!python version at the top of the file to match the version of python you are trying to use. As an example, I installed Python 3.8.2 on my mac, but those files still had the path to the 3.6 version, so I edited it to #!/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
Try this command: python -m IPython notebook
Credits to the GitHub user Milannju who provided the solution here.
This worked for me. (Python 3.6 on Ubuntu 18.04 LTS)
export PATH=$PATH:~/.local/bin/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With