To start working with Python and jupyter notebooks in the
computer labs you have to log in to a Linux account. Then execute
the command
for bash shell
This will setup a virtual Python environment with necessary packages. The jupyter notebook is started with commandsource /app/Python/3.10.7/VE/DataScience/bin/activate
for tcsh shell
source /app/Python/3.10.7/VE/DataScience/bin/activate.csh
jupyter notebook
This should open a browser or a new tab in browser. You can now
choose new
from the menu to create a new notebook or
open an existing notebook.
To setup the environment on other computers please follow the
instructions given below:
We suggest that you use Anaconda or miniconda environment
for managing python and its modules.
To accomplish this please go to miniconda or Anaconda
download sites na follow the instructions there. You should
install Python 3.6 or higher !
After you have downloaded and installed any of those
environments you should create a Python virtual environment for
Data Science.
This is achieved by using conda
command. This is
done by invoking
conda create --name datascience python=3.6 numpy scipy pandas scikit-learn matplotlib jupyter notebook
This will created the environment and install the required packages.
After creating the environment you can activate it using the command
source activate datascience
and deactivate usig the command
source deactivate datascience
The detailed documentation can be found conda user guide.
After activating the environment please go to the directory where the notebook is located and start the jupyter notebook with the command:
jupyter notebook
This should start server and open the browser, or new tab in already open browser with a list of files. Clicking on the notebook file should open it. You can find many jupyter resources on the web. For example Jupyter Notebook Tutorial: The Definitive Guide or Jupyter/IPython Notebook Quick Start Guide.