Setting Up a Python Development Environment for macOS
Setting up a development environment for Python can be a bit confusing, mainly stemming from the fact that there are multiple competing standards for package management.
Compared with Node.js, which indeed has several different popular package managers such as npm
, yarn
, and pnpm
, they all agree on a common manifest format (package.json
) and they are largely interoperable with each other. In addition, it's very clear to new developers that npm
is where you ought to start.
This is not the case with Python, where there are multiple competing manifest formats (requirements.txt
, Pipfile
, pyproject.toml
), interoperability is hit and miss, and it's not clear where to start because the official PEPs are somewhat conflicting and the Python Packaging Authority (PyPA) doesn't take a strong stance on the issue either.
pip
, which usesrequirements.txt
, is the most official and is in the standard lib. But, it's lacking in features you might