Jupyter is a web application that lets you create interactive/sharable code on multiple languages including Python [http://jupyter.org/]
Jupyter is already installed in the TP room computers. You can find it in:
Menu>Dévelopment>Ipython Notebook (Anaconda)
The default python version is 2.x
We need to install the ipython-sql extension (which provides the
- In a terminal run the following command:
pip install --user --upgrade ipython-sql
- Now you can start Jupyter, it may take some time until it loads the content of the local folder.
If Jupyter does not loads the content of the folder:
- Click on the home logo inside Jupyter (the blue house icon) and wait
- If nothing loads after 1 min, close Jupyter and the related terminal window (
Ctrl+ctwice) and try again
- Once the content of the local folder is loaded, you can navigate to the folder where the notebook file (.ipynb) is located.
- Double click on the notebook file to open it.
- The notebook should work now
Create a virtual environment for the TP which includes:
- Python (3.x recommended)
You need to do the following:
- From the course website, get the script
virtualenv-script.shand save it into the path where the virtual environment will be created (~90MB of free space required)
- In a terminal, go to the path where you placed
- Change permissions to execute the script
chmod +x virtualenv-script.sh
- Run the script
- If no errors are reported then we can use the virtual environment:
5.1 Activate the virtual environment
5.2 Lunch jupyter
5.3 Deactivate when done
If you want to work in your personal computer you will need:
- Python (3.x recommended)
- ipython-sql extension
Anaconda is the easiest way to get a working python environment (Linux, MacOS, and Windows). Anaconda includes a collection of popular packages on different fields (including Jupyter).
Miniconda is a minimalistic version of
Anaconda which contains only conda (package administrator) and Python. Extra packages have to be installed manually (Jupyter and ipython-sql). This option is recommended if HD space is a constraint.
To install the ipython-sql extension:
- Run the following command in the command prompt:
pip install ipython-sql
Note: If you are using Windows,
pip requires a compiler sometimes [https://wiki.python.org/moin/WindowsCompilers].
If you can not use
pip, this is a workaround:
- Download the project from https://github.com/catherinedevlin/ipython-sql
In the top right section of the page you will find a green button (“Clone or Download”), click it to get a link for the zip file containing the project.
- Extract the content of the zip file from the previous step to a path in your computer.
- In the command promt, go to the path where you extracted the files and run the following command:
python setup.py install