Package Managers

What this is. A package manager installs software and its dependencies, then keeps track of what it put where. Installing by hand means resolving dependencies yourself and having no record of what to remove later.

Homebrew for macOS system tools: brew install python

apt on Debian and Ubuntu: apt install python3

npm for JavaScript packages: npm install express

pip for Python packages: pip3 install requests

The first two install things for the whole machine. The last two usually install things for one project.

The pattern is the same everywhere. Every one of these has the same four verbs, only spelled differently: search for a package, install it, list what is installed, and update. Once you have seen the shape in one, the rest are a matter of looking up the exact word.

SANKOFA SANDBOX
learner:~$

These package managers are simulated here, but the command shapes and the files they create are accurate.

Try it → Run `node --version`, `python3 --version`, `npm --version`. Then `npm init -y` and `ls`, then `cat package.json`. Then `npm install` and `ls` again to see node_modules appear.

Mark this lesson complete

Signed in, your progress follows you to every device.

Next: Versions, Isolation, and Reading Errors →
← Back