wiki:Workshops/HowToRunPythonOnCypress2025August

Version 13 (modified by fuji, 7 days ago) ( diff )

--

HPC Workshop Spring 2026

Module 4 of 8 - How to run Python on Cypress

Download examples:

git clone https://gitlab.tulane.edu/fuji/hpc-workshop.git

What is Python?

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built-in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components.

Python 2 or 3

Python 3 was incompatible with Python 2.

Python2

The last version of Python 2, released in 2010, was Python 2.7. Support for this version ended on January 1, 2020.

# HELLO PYTHON
import datetime
import socket

now = datetime.datetime.now()
print 'Hello, world!'
print now.isoformat()
print socket.gethostname()

Python3

Python 3 was not just another version of Python 2 code. Python 3 introduced new syntax to prevent redundant or repetitive code.

# HELLO PYTHON
import datetime
import socket

now = datetime.datetime.now()
print('Hello, world!')
print(now.isoformat())
print(socket.gethostname())

Python2 or Python3 ?

  • If you are new to Python and plan to write Python code, you should use Python 3.
  • If you use a Python application downloaded from another source, check its documentation to determine which version of Python is required.
    • Only use Python 2 if you are required to run or maintain a legacy application that specifically depends on it.

Why use an HPC Cluster?

  • tasks take too long
    • When the task to solve becomes heavy on computations, the operations are typically outsourced from the local laptop or desktop to elsewhere. 
    • Your computation may execute more efficiently if the code supports multithreading or multiprocessing.

  • one server is not enough
    • When a single computer can’t handle the required computation or analysis, the work is carried out on larger groups of servers.

How to run Python on Cypress

Creating CONDA Virtual Environment and Installing Packages

Jupyter Notebook


Note: See TracWiki for help on using the wiki.