export PATH=$PATH:~/Library/Python/3.8/bin # Run this again. export PATH=$PATH:~/Library/Python/2.7/bin # OR this, depending on which version of python you are using. echo $PATH # It should look something like this /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin # Run this to add python to your path. Then do the following in your terminal: # Enter this to see what your current environment variables are. To make things easier, we need to add everything before jupyter-notebook to our environment path.įirst, shutdown your notebook by hitting Control + C then “y” to confirm. This is because your computer doesn’t know where to look for the jupyter notebook command, so we have to specify the whole path every time. To run Jupyter Notebook as everything is right now, you probably need to do something like this: ~/Library/Python/2.7/bin/jupyter-notebook Before you start installing and reinstalling things (like I did), try this: 1 | Add python to your environment $PATHĪdding python to your path basically means, you are telling your computer to search in the specified directory path for the commands so you don’t have to write the full path every single time. You do pip list and see that it’s definitely there. So, please enter the following command: jupyter notebook But you run into this dreaded error: Traceback (most recent call last): File "/usr/local/bin/jupyter", line 8, in sys.exit(main()) File "/Library/Python/2.7/site-packages/jupyter_core/command.py", line 247, in main command = _jupyter_abspath(subcommand) File "/Library/Python/2.7/site-packages/jupyter_core/command.py", line 134, in _jupyter_abspath 'Jupyter command `` not found.'.format(jupyter_subcommand) Exception: Jupyter command `jupyter-notebook` not found. Run it with the command jupyter notebook.” Once that is complete, in their documentation they say, “Congrats! You’ve installed it. If you use pip, you can install it with: pip install notebook # if you run into user permissions, use this pip install -user notebook
0 Comments
Leave a Reply. |