Getting started with the brightwind library on Windows 10


Last updated: 12 September, 2019

Outline:

This guide will lead you through all the steps and installations required to start using the brightwind library, assuming a basic level of computer knowledge. These steps will include:

  • Installing the Anaconda Python Distribution

  • Installing the brightwind library

  • Using the brightwind library in Jupyter notebooks


Installing the Anaconda Python distribution

Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing that aims to simplify package management and deployment. Anaconda is the easiest way to install Python and all the associated packages for a Windows environment.

  1. Open up the Anaconda download page in a seperate window by clicking https://www.anaconda.com/distribution/.

  2. Make sure you select the Windows icon as Mac OS is selected by default.

  3. Click the download button under the Python 3.7 version. This will download the entire package so may take a while.

image1

  1. Depending on browser you may need to run the downloaded .exe file to install Anaconda and follow the usual prompts. You can find more detailed instructions here https://docs.anaconda.com/anaconda/install/windows/

image2

Installing the brightwind library

  1. Once the installation has completed, go to the Start menu and search ‘Anaconda’. Make sure two applications appear, the ‘Anaconda Prompt’ and the ‘Anaconda Navigator’, as shown in the image below. If you cannot see both applications, it is likely that Anaconda did not install properly, as this has been known to occur. Please uninstall and try again.

image4

  1. With the ‘Anaconda Prompt’ highlighted, open this command line interface in administrator mode by clicking ‘Run as Administrator’.

  1. Once opened you can now install the brightwind library using pip. pip is a de facto standard package-management system used to install and manage software packages written in Python. To use simply type:

> pip install brightwind

        Note: If you have already installed brightwind and want to get the latest version simply type:

> pip install brightwind --upgrade

        If you receive errors stating that the command pip does not exist, it is likely that Anaconda did not install properly. Please uninstall and try again.

image5


Using the brightwind library in Jupyter notebooks

  1. The easiest way to use the brightwind library is through Jupyter Notebooks. First open Anaconda Navigator, which you should have installed previously, from the Windows start menu.

  2. Once opened, launch a Jupyter Notebook by clicking the button as shown in the image below. This will open a window in your default web browser.

image6

        First page of Jupyter Notebooks is a file explorer.

image7

  1. Navigate to a folder where you want to work in. In this case ../Documents/Analysis

  2. When in this folder you can now create a new Notebook. In the top right-hand corner of the screen, click ‘New’ and then ‘Python 3’ to open a new Python kernel. This will open in a new tab.

image8

        Opens a new tab where you can use Python and the brightwind library.

image9

  1. In the green highlighted cell type import brightwind as bw to import the brightwind library.

  2. To run this cell you can either click the play button in the menu bar as shown in the image below or use ‘shift’ + ‘Enter’ on your keyboard.

image10

  1. You can now use all the functionaly of the library. The first step of loading some data into memory can be done by typing the following:

data = bw.load_csv(r'C:\Users\Stephen\Documents\Analysis\demo_data.csv')
data.head(5)

image11

        To use the brightwind library, please see the next tutorial.



This tutorial can be downloaded as a Jupyter Notebook from the following link: https://github.com/brightwind-dev/brightwind/tree/master/docs/source/tutorials/getting_started_on_windows.ipynb