Practical information for the labs. (prepared by prof. P. Bialas)

Environment setup:

computer labs

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

    
        source /app/Python/3.6.2/VE/DataScience/bin/activate
    
This will setup a virtual Python environment with necessary packages. The jupyter notebook is started with command
    
        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.

your personal computer

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 !

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.