create a folder
md my-new-project
change into it
cd my-new-project
First we create a new virtual environment
virtualenv --python=python3 ./py_env
source ./py_env/bin/activate
If you want to get out of the environment, run...
deactivate
pip install numpy pandas scipy jupyter ipython
jupyter notebook
You can rename the notebook (click "Untitled" and give it a new name), which will save it in the folder.
To stop the notebook, close the browser windows, and then press Ctrl + c
followed by y
in the terminal.
If you want to directly open the notebook file you created, you can start the notebook with the filename as the last argument (assuming you named your notebook "my_notebook"):
jupyter notebook my_notebook.ipynb
If we import a module, and want to see the docs for a function (for example minimize
from scipy.optimize)...
import scipy.optimize as opt
In the notebook, you can press Shift + Tab
to bring up the documentation.
opt.minimize # <- put cursor at end of method, press Shift + Tab