Starting with Python¶
Sell It¶
Python is a flexible language with a rich ecosystem of libraries for data science, web apps, and automation. Its clean syntax reads like English and it runs on every major operating system, making it a great first language for researchers and analysts.
Show It¶
A minimal script prints a message, but even this tiny example demonstrates the language's readability:
print("Hello, OASIS!")
Do It¶
- Install Python. Download Python from the official site or install a distribution like Anaconda that bundles common tools.
- Create an environment. Use
conda create -n myenv python
orpython -m venv myenv
to keep project packages isolated. - Activate the environment. Run
conda activate myenv
or on macOS/Linuxsource myenv/bin/activate
(Windows:myenv\Scripts\activate
). - Install a package. Try
pip install pandas
to see how dependencies are added. - Run the script. Save the example above as
hello.py
and executepython hello.py
.
Review It¶
Check python --version
and run pip list
to view installed packages. When
you're done, deactivate the environment with conda deactivate
or
deactivate
so your base system stays clean.