Anaconda is a Python package management and distribution tool.
Anaconda provides a data science platform that distributes both Jupyter (by default) and Node.js (optionally). iJavascript
can be installed in an Anaconda setup as follows:
conda install nodejs
npm install -g ijavascript
ijsinstall
Notice that you need to use the ijsinstall
utility to allow Jupyter to use the Javascript kernel.
Anaconda prompt
in Windows or simply search for "cmd"(base)> conda env create -f environment.yml
If you see Solving environment: done
, do NOT exit! The setup will take a while.
A bunch of downloads will occur. When the downloads are finish, type below at command prompt
(base)> activate pyfinance
(pyfinance)>
To get help
>>> jupyter notebook --help
By default, jupyter notebook opens the notebook dashboard in the current working folder. To open in a different folder, run:
jupyter notebook --notebook-dir=[put your path here]
To start Jupyter Notebook: At Anaconda prompt:
(base)> activate pyfinance
(pyfinance)> jupyter notebook
To change the startup directory in Windows https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html#change-jupyter-notebook-startup-folder-windows
If this is the first time using jupyter notebook
, make sure that you copy the url with the token for future login
http://localhost:8888/?token=e878ff75ee1b5ac82db1be2d135caccf64b7a2fa20b4d03a
shift-enter
: execute command
shift-tab
: get documentation string
tab
: if press after ".": get list of methods. if press during typing: auto-complete
pwd
: check the directory where Jupyter notebook is in
Kernel > Restart
will restart the kernel e.g. infinite while loop but it will also delete all the variable names assigned earlier.
Cell > Run All Above
: Re-run code above
Cell > Run All Below
: Re-run code below
jupyter notebook files end with a ipynb
extension. You need to press shift+enter
to execute the command in the cells above your input cell.