Getting Started with Conda / python / Jupyter Notebook environment


Choose a working directory (IMPORTANT)

Check how much space you have in your network home dir (/homes/yourlogin). You have a 7 Go quota, so this should be more than enough. It is highly recommended to work there, as this is backuped and saved daily. If you don't have enough space there, FREE SOME SPACE (recommended), or alternatively you can create a folder under /users/local/ (but data is not guaranteed to stay there).

Checking out the git repository of the course

Change dir to your working directory and type

git clone

This will create a INT277 folder containing Jupyter Notebooks to start the projects.

Neuroimaging data viewer

See here to install MRICRON

Alternatively, you can also use this online viewer :

Miniconda installation

  1. Open a terminal
  2. go to the chosen working directory
  3. wget
  4. bash
  5. Review license agreement, press ENTER. Press q to exit the license agreement... type "yes", then change installation dir (if necessary)

Virtual environements

We will use a virtual environment in Conda, which makes it easier to install new packages without admin priviledges.

Create a new environment with the following command

conda create -n intersem python

You can now list the available environements by typing :

conda env list

You should see the newly created environment "intersem". Activate it using :

source activate intersem

You will see (intersem) at the beginning of your terminal, indicating you are now working under the virtual environment.

To deactivate the current environemnt, just type :

source deactivate

More on conda environments here.

Installing new packages using PIP

When the environment is activated, install new packages using pip. For example :

pip install jupyter

To see all packages currently available under an environment, type :

conda list

For the projects, we will need the following packages :

  • jupyter
  • matplotlib
  • pandas
  • Nilearn
  • sklearn
  • nibabel

You can install them all in one go by doing :

pip install jupyter matplotlib pandas nilearn sklearn nibabel

In [ ]: