Installation and Setup
Install and verify a current Python 3 on Windows, macOS or Linux, then run your first script and manage dependencies with pip, venv, uv or Poetry
It is a Tuesday evening. A friend from your study group sends you a small
program as a file named quiz_game.py, along with the message "just run it".
You double-click the file and a window flashes open and vanishes. You try again
with a right-click and an "open with" menu, and now a text editor shows you
something that looks like English but with sentences such as
input("Guess a number: "). Nothing is running. The file sits there like a
locked door.
You open a search engine and the first result says something mysterious: "type this command into a terminal". A terminal. On a system where your tools so far have been a browser and a word processor, this is the first genuinely new room in the house. That room is where every programmer of every language works, and learning to walk into it on purpose, rather than by accident, is exactly what this lesson teaches.
The good news about timing: the official tooling for getting Python onto a machine was completely rebuilt across 2025 and 2026. On Windows there is now a single supported installer component that keeps itself up to date, and it replaces advice you will find in many older tutorials. If you follow any tutorial that tells you to tick a magic box called "Add Python to PATH", that advice describes the old world. This lesson describes the November 2026 world in the words of the official documentation.
By the end of the lesson you will have the full beginner toolchain working on your own machine: a verified language installation, an editor, a running script and a private workshop for packages. Every command shown here is real, and every one of them is typed by a beginner within the first hour of learning.
Key terms
- The program that reads your Python source code and executes it directly. The official one is called CPython, and installing it is the first job of this lesson.
- The current official Windows tool for installing and updating Python. It puts the python, py and pymanager commands on your machine.
- Read, Eval, Print, Loop. A live conversation with the interpreter: you type one statement, it answers immediately, then it waits for the next.
- The text window where you type commands such as python --version and see their text output. Also called a command line.
- The installer for third-party Python packages. It fetches them from the public catalogue called PyPI and places them where the interpreter can find them.
- A virtual environment: a private, disposable folder of packages attached to one project, so that installing something for one project cannot break another.
- The program in which you write and save source code files. VS Code, PyCharm and IDLE are the common beginner choices.
Interpreter
Install Manager
REPL
Terminal
pip
venv
Editor
1. The Four Tools Behind Every Python Project
Before touching a download button, it pays to know what you are actually putting on your machine, because "installing Python" is really installing a small team of tools that cooperate. The map below is the whole lesson in miniature, so return to it whenever the details get dense.
Description
A mind map of the beginner Python toolchain with four branches around the central Beginner toolchain node: an Interpreter that runs your code with the python command, a Terminal for verifying versions and starting the REPL, an Editor such as VS Code, PyCharm Community or IDLE, and Package tooling where pip installs packages and venv keeps each project isolated.
Reading the map clockwise from the top left:
- Interpreter. The actual Python. When someone says they "installed Python", they usually mean CPython, the official build from the Python Software Foundation, and how to install it is the subject of sections 2 to 5.
- Terminal. The text window. Every verification command, script run and package install in this lesson happens there. You will type far more in it during your first week than in the editor itself.
- Editor. Where source files are written and saved. Any plain text editor can save Python files, but a programming editor highlights your syntax and reports mistakes as you type.
- Package tooling. The pair of
pipandvenvdeserves its own section, and section 7 gives it one. For now, understand a package as code someone else published for reuse, and a virtual environment as a private sandbox that keeps such code from mixing between projects.
One distinction from lesson 1 still matters. Python the language is the set of rules you write in. Python the thing you install is an interpreter that reads those rules and acts on them. This lesson installs a real interpreter and teaches you to talk to it from the terminal.
That vocabulary is enough to check yourself with a matching exercise. Match each tool to the job it actually does, and notice how disjoint the jobs are: editing, running, installing and isolating never overlap.
How to answer
Matching exercise with 5 pairs. Match each item on the left with its answer on the right.
Match each tool to its job.
Drag answers from here:
2. Windows: the Install Manager Era
Windows is both the easiest and the most-changed platform in this lesson, so read this section even if you use another system, because it explains the new tool names used across the ecosystem.
Since Python 3.14, the official way to obtain Python from the CPython team on
Windows is the Python Install Manager. In the words of the official
documentation, it is a standalone tool that makes Python available as global
commands on your machine, integrates with the system, and supports updates
over time. You fetch it from two places, and they serve the same component: the
page at https://www.python.org/downloads/ and the Microsoft Store app.
The manager is genuinely new tooling, not a wrapper around the old installer. After it finishes, three commands become available in any new terminal window:
python # the interpreter itself
py # a launcher that picks the right Python for your project
pymanager # the manager command, for listing and updating versionsA quiet revolution hides in that list: plain python now simply works. For
years, typing python into a fresh Windows terminal either failed or opened a
Store page instead of running an installation, which tormented every beginner
tutorial ever written. The manager installs real commands, so python runs
Python. That trap survives only on machines with very old or partial installs,
and the traps section near the end covers it.
Two dated facts set the boundary of the change. The traditional Windows installer has been deprecated since the 3.14 series, and it will not be produced for Python 3.16 or later. The manager itself is young and actively shipped: the latest version as of November 2026 is 26.4, published on 9 October 2026. If a blog post references a checkbox installer or any other tool on a modern Windows machine, prefer the official documentation.
The first verification of this lesson belongs here. Open a new terminal window, which matters because already-open windows do not see newly installed commands, and check:
python --version
py --versionConcrete expectations keep this honest. On 25 October 2026 the 3.15.2 and 3.14.10 installers were produced, so a fresh machine should print a 3.15 or 3.14 series number. Anything older means an outdated mirror or cached download, and re-downloading from the official page fixes it.
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
A friend finishes the official Python installation with the modern Python Install Manager on Windows. Which set of commands should be available in a new terminal window?
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
The Python Install Manager for Windows can be obtained from which sources?
How to answer
Multiple-choice question with 2 options. Select one option, then choose Check Answer.
Microsoft plans to keep producing the traditional Windows installer for Python 3.16 and later releases alongside the manager.
📚 Did you know? The Python Software Foundation publishes the Install
Manager as one single component through both the Microsoft Store and
python.org, so the two routes give you the same tool. Choosing between them
is a preference about how you like updates delivered, not about what arrives.
3. macOS: the Signed Official Path
macOS offers several ways to end up with Python, and only one of them is
maintained by the Python Software Foundation: the official installer package,
a .pkg file downloaded from the python.org downloads page.
Two properties of that file matter. First, the installer packages are signed
with an Apple Developer ID Installer certificate, and they are notarized for
Gatekeeper, Apple's check for downloaded software. Double-clicking the .pkg
therefore behaves politely: no scary warnings and no manual permission
bypasses. Second, after installation a folder named Python 3.15 appears in
/Applications/Python 3.15/, and the official instructions include one step
tutorials often forget:
Double-click the
Install Certificates.commandfile in the/Applications/Python 3.15/window to complete the installation.
That step fills in the certificates that secure network connections rely on.
Skipping it does not break your first print statement, but the first network
fetch can fail with a puzzling certificate error whose root cause sits in a
folder you were told about on day one.
Verification on macOS accepts two command names. The official python3 --version always names the interpreter available to the shell, and on modern
setups python --version also works. Type one, see a 3.15 or 3.14 series
number, and the install is done.
python3 --versionThe second macOS topic is Homebrew, the popular package system. Honest
comparison: brew install python is convenient and well maintained by its own
community, but it is not the PSF-supported path. Two differences matter to a
beginner. Homebrew's Python can lag the latest release, and it does not bundle
the Tcl/Tk dependency that the built-in GUI toolkit tkinter needs; Homebrew
provides a separate formula such as python-tk@3.14 for that. Neither
difference is fatal, but when a course says "install Python" without
qualifiers, it almost always means the official build.
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
A macOS user is determined to install exactly the Python build maintained and signed by the Python Software Foundation. Which path should the user pick?
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
A beginner installs Python through Homebrew and then finds that programs using the built-in `tkinter` toolkit fail to start. Which dependency is missing from Homebrew's default Python?
📚 Did you know? The macOS installer file itself is verified by your operating system before it runs, because it is signed with an Apple Developer ID Installer certificate and notarized for Gatekeeper. The polish of that double-click experience is the product of formal requirements, not luck.
4. Linux: Usually Already There
On most Linux distributions, Python came with the system. The official documentation states it plainly: Python comes preinstalled on most distributions and is available as a package on all others. Your first task on Linux is therefore not installation but identification: find out what you already have.
python3 --versionNotice the command name. On Linux the interpreter is conventionally named
python3, because an old python2 lived beside it for so many years that the
number became part of the name. Distributions keep their packages stable for
long periods, so a preinstalled Python often belongs to an older series than
the 3.15 release current in November 2026. That is fine for learning: this
course's early lessons run on anything from the 3.10 series upward.
If your distro package is too old for a future lesson, three upgrade paths
exist. Distro packages, via commands such as apt on Debian family systems,
are the routine choice and can lag the newest series. Tools named pyenv and uv
exist because many developers want several versions side by side and pick per
project. Building from source is the max-effort path that gets you the newest
number.
One habit to carry out of this section: on Linux, reach for python3 unless
you have verified that plain python points somewhere sensible.
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
On most Linux distributions, which command name conventionally identifies the modern Python interpreter in a terminal?
5. The Verification Habit and the Whole Decision Tree
Everything in sections 2 to 4 collapses into one habit: after any install action on any platform, open a new terminal and ask the machine to state its version. Ten seconds of typing prevents an hour of mysterious failures later, and it is the cheapest debugging skill in existence.
python --version # Windows, and macOS installs that provide it
python3 --version # Linux, and macOS
py --version # the Windows launcher installed by the managerThe decision tree below compresses all three platform paths into one picture, and its structure is the real lesson: whichever branch you take, every route ends at the same verification node. The blue nodes are download decisions, the green nodes are post-install actions, and the yellow node is the shared finish line.
Description
A flowchart with three parallel installation branches, Windows, macOS and Linux, that all converge on one goal: a terminal where a Python version number prints. Windows installs the Python Install Manager from the Store or from python.org, then a new terminal checks the python and py version commands. macOS downloads the signed installer from python.org, runs the Install Certificates command, then checks python3. Linux uses the distribution package manager or builds the newest release, then checks python3.
Read the tree once for your own platform and once for all of them, because the shared endpoint is the durable lesson. Any Python tutorial assumes you emerge with a version number on screen. A "not recognized" or "not found" message means the gateway node never happened, not that Python is broken.
Do not move past this point with an unverified install. A version command that answers is the entry ticket to every remaining section; running a script or installing a package on an unverified setup produces errors that look like bugs in your code but are actually about the environment.
6. Your First Script and the REPL
With a verified interpreter, the locked door from the opening story opens from
two sides. The first side is files: the interpreter reads a .py file you
wrote and executes it. The second side is conversation: you type one statement
and the interpreter answers immediately, a mode with its own name, the REPL
from the glossary.
Start with the file, the conventional first script. Create a file named
hello.py in a folder you can find again, type one line, and save it with a
.py extension, which tells both your editor and future you what the file is.
# hello.py
print("Hello, Nuniversity!")Then run it from the terminal, from inside the folder that holds the file:
python hello.pyThe interpreter prints Hello, Nuniversity! and returns control to the prompt.
The sequence is the loop you will repeat thousands of times: write, save, run,
read the output, adjust, repeat.
Description
A sequence diagram between you, the editor and the interpreter: you type print Hello, Nuniversity! in the editor, save the file as hello.py, the editor confirms the file is on disk, you run python hello.py in the terminal, the interpreter reads and executes hello.py and prints Hello, Nuniversity! back. A note summarizes the loop: write, save, run, read the output, adjust and repeat.
Now the REPL. Type python or python3 with no file name, and the prompt
changes shape, usually to three chevrons, to show that a live session is
waiting. In this mode Python files play no role: each statement you type is
evaluated and printed on the spot.
python>>> 2 + 2
4
>>> print("live session")
live session
>>> exit()Leaving the session properly is worth memorizing. Type exit() and the
session ends; on macOS and Linux, the keyboard shortcut Ctrl-D does the same.
On Windows, Ctrl-Z followed by Enter does the same. Closing the terminal window
while a session runs also works, but a deliberate exit keeps you in the habit
of ending things on purpose.
The REPL's superpower is its zero-cost feedback. During lessons 3 and 4 you will test every new operator and data type by typing two characters and pressing Enter, and professional developers keep a session open for exactly the same reason years later: it is the fastest "what happens if" machine ever built.
7. pip and Your First Virtual Environment
Windows, macOS and Linux now each run your code. Two tools remain, and they arrive together because of a practice decision you should make today rather than in six painful months.
First, pip. The standard distribution includes it, and it fetches third-party
packages from PyPI, the public catalogue you met in lesson 1. Three commands
cover a beginner's needs: check pip --version to confirm pip exists, pip install requests to add a specific useful package, and pip list to see what
is installed.
pip --version
pip install requests
pip listSecond, the venv module, and here come the two most important commands in the
lesson. A virtual environment is a private folder holding its own package
collection, created per project:
python -m venv .venvThat command creates a folder named .venv in the current directory. Creating
it does not switch anything; you must activate it, and the activation
command differs by system:
source .venv/bin/activate # macOS and Linux
.venv\Scripts\activate # WindowsOn success the terminal emits one subtle, permanent clue: your prompt gains the
environment name, typically a (.venv) prefix. From that moment until you type
deactivate, every pip install places packages only in that folder, and the
interpreter you run picks that folder as its package source.
The full life of an environment is short and repeatable: created, activated, used for installs, deactivated and eventually deleted when the project ends.
Description
A state diagram of a project's virtual environment lifecycle: it starts with no environment where packages install globally, creating the environment with Python's venv module moves it to Created, an activation command makes it Active, pip install requests runs inside it, deactivate moves it to Inactive, the activate command makes it Active once more, and deleting the .venv folder removes the environment and ends the lifecycle.
Why isolate at all, when pip works globally? Because package versions evolve. Install a package globally today, and a project you build next month may need a different version of that same package; globally installed packages fight each other, and failing builds begin with a sentence every tutorial dreads: "it works on my machine, maybe yours differs". A venv per project ends that class of problem before it starts.
How to answer
Fill-in-the-blank exercise with 3 blanks. Type the missing words, then check your answer.
Complete the two most important commands of the lesson: create the environment, activate it on macOS or Linux, and install one package into it.
blank -m venv .venv source .venv/bin/blank blank install requests
Word Bank, drag words into the blanks above:
Do not learn pip without learning venv. Installing packages globally is the most common self-inflicted wound of the first year of Python: it works immediately, the cost arrives months later as conflicting versions between projects. The habit of one environment per project costs thirty seconds and removes entire categories of future debugging.
📚 Did you know? The pip and venv pair is no longer the only packaging story. Many professional teams now use uv or Poetry, and section 8 shows both. Learn the standard library pair first, because every tutorial assumes it and it is already on your machine.
8. uv and Poetry: When pip Starts to Feel Slow
By your third project, pip will have done its job and shown its limits. You
will have created .venv again, activated it again, installed six packages, and
then tried to explain to a teammate why their identical-looking install behaves
differently. Nothing is broken. pip simply has no memory of the exact versions
you resolved last Tuesday.
Two modern tools fix that, and both are worth knowing by name in 2026. uv is a single fast binary written in Rust that installs Python itself, manages environments, resolves dependencies, runs scripts and runs tools. Poetry is the older, packaging-focused option that many libraries and teams still use.
They share one idea. Instead of a loose requirements.txt, a project declares
its dependencies in pyproject.toml, and the tool writes a lock file with the
exact versions it resolved. pyproject.toml records what you asked for, usually
as version ranges. uv.lock or poetry.lock records what you actually got, so
every machine installs the same tree.
Job | pip and venv | uv | Poetry |
|---|---|---|---|
Install Python itself | no, separate installer | yes, uv python install | no, bring your own |
Declare dependencies | requirements file or manual | uv add | poetry add |
Lock exact versions | manual pip freeze | automatic uv.lock | automatic poetry.lock |
Create the environment | python -m venv .venv | automatic in .venv | automatic, outside the project by default |
Run inside the environment | activate, then python | uv run | poetry run |
Run a one-off tool | install it first | uvx | poetry run after install |
Learning cost | lowest | low | moderate |
uv: one binary for the whole toolchain
Install uv with the standalone script, then let it install the interpreter too. On macOS and Linux the command is one line. On Windows use the PowerShell form.
# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"A new project then takes four commands. Read them as a sentence: install Python, create the project, add a dependency, run the program.
uv python install 3.15
uv init quiz-game
cd quiz-game
uv add requests
uv run quiz-gameFour details make the workflow click:
uv initwritespyproject.toml, pins an interpreter in.python-version, and creates asrcfolder for your code.uv add requestseditspyproject.tomland refreshesuv.lockin one step, so the declaration and the lock never drift apart.uv run quiz-gamesyncs the environment if needed and runs the project's declared command. You never activate anything by hand.uv syncrebuilds the environment fromuv.lockon a teammate's machine or in continuous integration.
Two extras are worth filing away. uvx ruff check . downloads and runs a tool in
a temporary environment, so a linter never pollutes your project. And uv self update upgrades uv when it was installed with the standalone script.
📚 Did you know? uv 0.13.7 was published to PyPI on 3 November 2026, one
day before this lesson was checked. Its own documentation lists uv python install, uv init, uv add, uv sync, uv run, uvx and the pip-compatible
uv pip commands as first-class features, which is why it can replace three
or four older tools at once.
Poetry: the established packaging workflow
Poetry predates uv and still has a large user base. Version 2.5.1 shipped on 20 September 2026, and Poetry requires Python 3.10 or newer. Unlike uv, it does not install an interpreter for you, so bring the Python you installed in sections 2 to 4.
Install Poetry in its own isolated environment with pipx, then create a project.
Poetry keeps its environments outside the project folder by default, which is
why you run commands through poetry run rather than activating a local .venv.
pipx install poetry
poetry new quiz-game
cd quiz-game
poetry add requests
poetry install
poetry run python -c "print('hello from Poetry')"Three behaviours differ from uv in ways that matter:
poetry newproducespyproject.toml, aREADME.md, asrcpackage and atestsfolder, a layout aimed at publishable libraries.poetry addupdatespyproject.tomlandpoetry.locktogether, andpoetry installfollows the lock exactly when one exists.poetry env activateprints the shell command that activates the project environment, whilepoetry config virtualenvs.in-project trueputs a.venvinside the project if you prefer the layout used by pip.
Since Poetry 2.0, dependencies can live in the standard [project] table
defined by PEP 621, so a Poetry project is still an ordinary pyproject.toml
project. You are not locked into a private format, and moving away later is
realistic.
Description
A decision flowchart for choosing the right environment tool: if the project ships a uv.lock file, run uv sync and then uv run; if it ships a poetry.lock file, run poetry install and then poetry run; with no lock file yet, first month learners use Python's built in venv module with pip, while experienced setups run uv init and then uv add, and if Python itself must be installed first, uv python install and uv init set up the toolchain.
Follow the lock file first, because a team's existing choice beats personal preference. When the choice is yours and the project is new, the tree points at the workflow that matches your experience.
How to answer
Fill-in-the-blank exercise with 3 blanks. Type the missing words, then check your answer.
Complete the uv workflow for a fresh project: install Python, add a dependency, then run the program.
uv blank 3.15 uv init quiz-game uv blank requests uv blank quiz-game
Word Bank, drag words into the blanks above:
Comparative Verdict: which tool should a beginner learn first
- pip and venv first, always. They are already installed, every tutorial assumes them, and they teach the concepts of environment and package that the modern tools automate. Skipping them makes debugging harder later.
- Add uv as your second tool. One binary covers interpreter installs, dependencies, locking, running code and one-off tools. The
uv.lockfile anduv runremove two entire classes of beginner mistakes.- Choose Poetry when a team or library already uses it. Its packaging workflow is mature, its lock file is well understood, and its commands map closely to the concepts you already learned. It is a fine destination, not a required detour.
- Verdict: learn pip and venv this week, install uv next week, and treat Poetry as the tool you adopt when a project asks for it.
Never mix managers inside one project. Running pip install inside a uv
project, or uv add inside a Poetry project, can leave pyproject.toml, the
lock file and the environment disagreeing. Pick the tool the lock file names,
and use only that tool for that project.
9. Choosing an Editor That Fits How You Think
An editor is where you will spend actual hours, so the choice is about comfort, not correctness: any of these three can write every line in this course.
- VS Code with the Python extension. The common free path: lightweight, syntax highlighting, inline mistakes and a run button. The community default for a first editor.
- PyCharm Community. A full IDE with refactoring, a debugger and project management. More to learn, and the free edition suffices for this course.
- IDLE. Ships with CPython, so it is already installed and doubles as a REPL. Fine for the first week, outgrown quickly.
A practical first-week algorithm: open IDLE tonight and feel the REPL; move to VS Code when a project spans more than one file; consider PyCharm when you want structure, tests and refactoring. Switching later is normal.
Save files with plain .py extensions and keep the encoding at UTF-8. Since
Python 3.15, text handling defaults to UTF-8 (PEP 686), and the official advice
still suggests naming an encoding explicitly when a program writes text files.
An editor that saves exotic encodings creates problems no Python knowledge
resolves quickly, so set UTF-8 once and leave it.
How to answer
Sorting exercise. Place each item into the correct bucket, then check your answer.
Sort each tool by the role it plays
Drag every card into the bucket that names its role.
Items, click an item, then click a bucket to place it:
Editor
Empty, click to place the selected item
Package manager
Empty, click to place the selected item
Interpreter command
Empty, click to place the selected item
Traps That Burn a Beginner's First Week
Every section above had a happy path. These four traps recur in the official documentation and in every beginner forum, and each has a thirty-second antidote.
- The Store-stub ghost on old Windows advice. On old-style machines,
typing
pythonopened the Microsoft Store instead of an interpreter. With the Install Manager the command works, so Store-opening behaviour means the machine is running old advice against new tooling; re-run the flow in section 2. - The Homebrew lookalike. A tutorial written for the PSF build can fail on a Homebrew build in GUI corners, because Tkinter and the install layout differ. Check where your Python came from before debugging the code.
- The global pip sprawl. It rarely hurts on day one: the projects whose installs break first are always the second and third ones.
- The encoding surprise. An editor set to a non-UTF-8 encoding combines badly with a language that now defaults to UTF-8. One preference tick fixes it.
2026 Updates (as of November 2026)
What changed very recently, and why older tutorials look different. Every line below was checked against a primary source in November 2026:
- Python 3.14 introduced the Python Install Manager on Windows, and it
makes the
python,pyandpymanagercommands available after install. Any tutorial about Windows that never mentions the manager is describing the older tooling generation. - The traditional Windows installer is deprecated and will not be produced for Python 3.16 or later.
- The latest Install Manager version is 26.4, published 9 October 2026 on the python.org downloads page.
- Python 3.15.2 and 3.14.10 installers were produced on 25 October 2026, so a fresh install should print one of those series numbers on verification.
- On macOS, the free-threading option is installed by default as part of the current installer path, alongside the standard build.
- PEP 686 made UTF-8 the default text encoding from Python 3.15, which is why this lesson tells you to set every editor and file save to UTF-8.
- The dependency tools are current too: uv 0.13.7 reached PyPI on 3 November 2026, and Poetry 2.5.1 on 20 September 2026. Both are maintained and safe to adopt, and section 8 compares them with pip.
Practice Questions
Answer these before moving to the next lesson. Questions q1 to q6 appear inside their topic sections above, and the six below are the cumulative set, so every question is answerable from this lesson alone. Each explanation names both why the correct answer is correct and why the strongest wrong option traps, so reading them after self-checking is revision too.
How to answer
Multiple-choice question with 2 options. Select one option, then choose Check Answer.
A live interactive Python session is started by typing `python` with no file name and is closed either with `exit()` or with Ctrl-D on macOS and Linux.
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
Which command creates a virtual environment named `.venv` in the current folder?
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
Which pip command shows every package currently installed?
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
A learner follows a 2023 blog post on Windows that instructs a checkbox labelled 'Add Python to PATH' during setup. In November 2026, what should the learner actually do?
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
A project has an active virtual environment named `.venv`. A package installed with `pip install requests` at that moment goes where?
How to answer
Multiple-choice question with 4 options. Select one option, then choose Check Answer.
A teammate clones a project that contains `pyproject.toml` and `uv.lock`, and the team standardised on uv. Which command rebuilds the environment from the locked versions?
Dig deeper
Dig deeper
- Python downloads page: Install Manager and installersPython Software Foundation
- Using Python on Windows, including Install Manager notesPython 3.15 documentation
- Using Python on a Mac, including the certificates stepPython 3.15 documentation
- The venv module: creating virtual environmentsPython 3.15 documentation
- Python Packaging Tutorials, including pip workflowsPython Packaging User Guide
- uv documentation: installation, projects and toolsAstral
- Poetry documentation: dependency management and packagingPoetry
What Comes Next
The toolchain is assembled: a verified interpreter answers version commands, an
editor is chosen, a hello.py runs, a REPL session answers statements, and one
.venv holds a package per project. Lesson 3 finally becomes the writing
lesson you expected at the start: variables and types, with your own machine as
the laboratory rather than a reading exercise.
If you want one long, friendly video companion to pair with this course, the freeCodeCamp recording below covers installation and first programs exactly as this lesson does, at full university length, and it is free.
Description
A recorded full length Python course by freeCodeCamp that performs the same installation and setup steps on Windows, macOS and Linux on camera; useful to watch after this lesson to see every step carried out.
Key Takeaways:
- Installing Python means installing a small toolchain: an interpreter, a terminal habit, an editor of your choice and a package workflow, not one monolithic program.
- On Windows, Python 3.14 and later arrive through the Python Install
Manager, which puts the
python,pyandpymanagercommands in any new terminal and is available from both the Microsoft Store andhttps://www.python.org/downloads/. - The traditional Windows installer is deprecated and will not be produced for Python 3.16 or later, so old checkbox instructions describe retired tooling.
- The latest Install Manager is version 26.4, published 9 October 2026, and the newest installers produced are the 3.15.2 and 3.14.10 files dated 25 October 2026.
- On macOS the PSF-supported path is the signed, notarized
.pkginstaller from python.org, and itsInstall Certificates.commandstep belongs in your notes; Homebrew's convenient build is community maintained and misses the Tcl/Tk dependency thattkinterneeds. - On Linux,
python3is the interpreter command, clean installs usually already exist, and distro packages can lag the newest series by design. - The verification habit closes every install path: a new terminal, then
python --versionorpython3 --version, and any 'not recognized' message usually means a stale terminal rather than a broken install. python hello.pyruns a saved file and a barepythonstarts the REPL, whereexit()or Ctrl-D (Ctrl-Z then Enter on Windows) ends the session.- One environment per project is the habit that future proofs packaging:
python -m venv .venvcreates it, an activation command turns it on, the prompt gains the.venvname, anddeactivateturns it off. - pip is the package installer,
pip install requestsadds a package,pip listinspects them, and the freeCodeCamp full course video is a friendly filmed companion when you want to watch these steps performed. - Modern projects declare dependencies in
pyproject.tomland pin exact versions in a lock file: uv writesuv.lock, Poetry writespoetry.lock, and both make installs reproducible across machines. - Learn pip and venv first, then adopt uv for its all-in-one workflow, or Poetry when a team already standardises on it, and never mix two package managers inside one project.
References
Every factual claim links to its source, with the access date printed so the source can be rechecked.