0%

Isolated Environments and Packages

Read a Package Failure

A successful install scrolls past quickly. A failed one deserves slower reading, because two failures that both end with red text call for different actions.

The shelf does not contain that package

Suppose you ask the site for a package outside its reviewed set. pip will end with wording like this:

python -m pip install rich==99.0.0
ERROR: Could not find a version that satisfies the requirement rich==99.0.0
ERROR: No matching distribution found for rich==99.0.0

The important phrase is no matching distribution. It means the configured has no file matching the name, version, Python, and you requested. On this site, first check the stocked direct set: requests 2.34.2, pytest 9.1.1, and uv 0.12.3. Then check the spelling and exact version in your command.

If the package is not in that set, stop there. Do not add a second index or point the sandbox at . Public fallback is intentionally unavailable, and changing the URL would not grant the sandbox public network access anyway. Use the package named by the lesson, or ask for course support if the lesson itself names something the mirror does not stock.

The shelf cannot be reached

A different failure repeats connection attempts and contains wording such as this:

WARNING: Retrying after connection broken by 'NewConnectionError'
ERROR: Could not connect to the package index

That is not evidence that requests disappeared. It means pip could not reach the configured service. Check that the package name and version are one of the supported pins, wait a short moment, and retry once. If the same connection error remains, report that the Python Land package mirror appears unavailable. Rewriting your requirements will not repair a service connection.

A useful three-question check

When an install fails, ask these in order:

  1. Is the package name spelled exactly as the lesson writes it?

  2. Is that exact name and version in the site’s stocked set?

  3. Does the message say no match, or does it say connection and retry?

The first two send you back to your command. The third can tell you the platform needs attention instead.

You request requests==2.34.2, and pip repeatedly says NewConnectionError before it fails. What is the best next move?

An installed environment proves what works now. The next lesson records what should work again tomorrow.

When an install fails and you cannot classify the message, paste the last few lines to Monty and ask which of the two failures it is. A name problem and a service problem look similar and need opposite responses.