Skip to Main Content
UC Logo
Libraries | Ask the Libraries

Python (programming language)

This guide serves as a Python tutorial for beginners. It also contains links to other useful resources and installation guides

Graduate Assistant

Profile Photo
CEAS Library
Contact:
CEAS Library

(Available: Mon-Fri 8am - 12noon)
513-556-1550

Introduction

What is Python?

Python is an open-source, interpreted, high-level, object-oriented programming language developed by Guido Van Rossum in 1991.

Why is it used?

Python has a relatively steady learning curve due to its simple and easy-to-learn syntax. It works on any operating system like Windows, mac, Unix, etc. Also, accomplish any task with fewer lines of code. Being a general-purpose programming language, it is not limited to any specific task but, it can be used for anything and everything, making it very versatile. As a result, Python has become one of the most popular programming languages.

Where is it used?

Due to Python's ubiquity and portability, it is used in various applications like

  • scientific computing,
  • data science,
  • artificial intelligence,
  • text/data mining,
  • web and software developments,
  • task automation and many others.

Please visit this page for more applications of Python.

Getting Started

Python uses an interpreter to execute the code. This interpreter converts one line at a time in the source code into a simple bytecode. This line-by-line translation allows finding the error with ease. There are multiple ways to run Python code. Following are some of the environments to run the Python code.

Stand-alone Python Installation

Python is supported on all the major operating systems. Click the following links to download the latest release for the respective operating systems. 

  • Windows 
    •  For more help on installation, visit this page.
  • macOS
    • For more help on installation, visit this page.
  • Linux/Unix
    • For more help on installation, visit this page

A text editor is used to write the long Python scripts with multiple functions and save them (with a .py extension) for future use. The list of all available text editors for Python can be found here.

Anaconda Installation

Anaconda distribution is a collection of Spyder, Jupyter Notebook, RStudio, and other commonly used scientific computing and data science tools. It is recommended for all the beginners to install Anaconda.

  • Download and install Anaconda distribution from here.
Jupyter Notebook Installation using 'pip'

Jupyter Notebook is a web-based tool to run live code including Python. Install Python before installing the stand-alone Jupyter Notebook. After the Python's installation, type one of the following commands in the command terminal.

  • 'pip install jupyter notebook' or 'pip3 install jupyter notebook'

'pip' is the keyword that is used to install missing libraries/packages in Python. Please visit this page to know more about 'pip'.

NoteMake sure the PATH variable is set properly before installing any Python related package. Click the following links to learn how to set the PATH variable in the respective operating systems.

    1. Right-click 'This PC' and go to 'Properties'.
    2. Click the 'Advanced system settings' on the right under 'Related settings'.
    3. Click the 'Environment Variables' button present at the bottom.
    4. In the 'System variables' section, select the 'Path variable' and click 'Edit'. This will display all the directories that are currently a part of the PATH variable.
    5. Click 'New' and enter Python’s install directory (Installation directory can be found at C:\Users\Username\AppData\Local\Programs\Python\Python310).
    1. 'csh' shell − type setenv PATH "$PATH:/usr/local/bin/python" and press Enter.
    2. 'bash' shell (Linux) − type export PATH="$PATH:/usr/local/bin/python" and press Enter.
    3. 'sh' or 'ksh' shell − type PATH="$PATH:/usr/local/bin/python" and press Enter.
      (Installation directory can be found at /usr/local/bin/python)

University of Cincinnati Libraries

PO Box 210033 Cincinnati, Ohio 45221-0033

Phone: 513-556-1424

Contact Us | Staff Directory

University of Cincinnati

Alerts | Clery and HEOA Notice | Notice of Non-Discrimination | eAccessibility Concern | Privacy Statement | Copyright Information

© 2021 University of Cincinnati