Python is a very popular programming language. It is somewhat easier to read than other programming languages. Best 2nd choice for many tasks that includes data analysis and plotting. R is amazing for my use case and I feel it is the better choice especially when it comes to statistical test and plotting. Ggplot2 is nearly unrivaled for the ergonomics.
However, the whenever I am determined to use Python, I am overwhelmed by the setup process. This is focused on the setup in the MacOS world. ( I won't go over Conda at all since for some reason it has sowed more confusion).
This is a draft version of the post which will get updated as I learn more.
1. Python Version:
2. Pip (Official way to install)
3. venv (Comes with the Python 3 version)
4. UV (Not platform agnostic as Poetry) : This is more for resolving package dependency as compared to pip. So far it has worked good for me which means
1. Creating virtual environment:
uv venv uenv1
2. Activating virtual environment
source uenv1/bin/activate
3. Installing your programs
uv pip install pandas
Vscode should detect the folder within which we have installed this virtual environment.
5. Pipx
Got pipx installed using brew install pipx and then was able to install uv.
Pipx is supposed to be subset of the pip which means it can only install command line tools but not all the packages such as Pandas or Polars which need to be imported as library. This is aptly described at: https://pipx.pypa.io/stable/comparisons/
6. Poetry
7. PDM
8. PyPy
I liked how this post keeps the focus on the practical side of setting up Python rather than jumping directly into coding. Many beginners get confused by tools like pip, virtual environments, package managers, and version handling, so seeing them explained together in a simple workflow makes the setup process feel much less intimidating. The mention of tools like venv, uv, and pipx was especially useful because environment management is something every Python developer eventually has to deal with. Developers who want to build real applications after setting up their environment can also explore Python Projects For Final Year for practical implementation ideas.
ReplyDeleteAnother thing I found interesting was the comparison between Python and R, especially from a data analysis perspective. A lot of discussions online treat them as competitors, but the post presents them more as tools with different strengths depending on the use case. The note about this being a draft that evolves with experience also makes it feel more genuine and relatable. Students looking to apply Python in analytical and data-driven applications can also check out Data Science Projects for Final Year to explore real-world use cases involving data processing and analytics.
ReplyDelete