Setup Programming Environments

In this lecture, we will learn

  • to install Python on the machine.

Introduction

I strongly recommend to choose Anaconda, a Python distribution aiming to simplify using for researchers who have no experience in programming. Jupyter, a web-based editor to write, modify and run Python code, is also contained in Anaconda.

Tip

(Optional) For those who prefer to write code in a desktop editor, Visual Studio Code would be a good choice. Another better choice is PyCharm, which provides a complete toolchain for engineering purpose.

Install Anaconda

Step 1. Download Anaconda installer.

_images/download-anaconda.png

Fig. 6 Go to Anaconda download page and click the Download button to start downloading.

Step 2. Double click the installer to lanuch.

Step 3. Read the licensing terms and click I Agree.

Step 4. Select an install for Just Me.

Step 5. Select a destination folder to install Anaconda and click the Next button.

_images/select-dest-folder.png

Fig. 7 Select the location on your machine to install.

Warning

Make sure the location does NOT contain any non-ASCII characters or spaces.

Step 6: Click Install.

Step 7: Click Next.

Step 8: We do not install PyCharm now, so click Next.

Step 9: Uncheck the two boxes and click Finish to close the installer.

_images/finish.png

Fig. 8 Congrats! You have successfully installed Anaconda.

Important

Some issues may occur during the installation.

  • No Administrator privilege granted (reported by Enyu). If this happen, please try again by right click installer and choose Run as Administrator in the menu.

  • Installtion path contains Chinese characters (reported by Haozhu). If this happen, choose another location. If you meet other issues, please contact me.

Launch Jupyter notebook

After the installation, you can find Jupyter in you start menu by searching for keyword jupyter, shown as below

_images/jupyter.jpeg

Fig. 9 Click the item to launch a Jupyter notebook.

Then, a new shell window will pop up and Jupyter will launch your defautl browser and open your home directory. Click the New button and choose Python 3 (ipykernel),

_images/home.png

Then, a new Jupter notebook will be created.

_images/nb.png

Fig. 10 Congrats! You have created a Jupyter notebook.