Skip to content

macOS Install Certificates script breaks with PIP_REQUIRE_VIRTUALENV #159210

Closed

Description

@freakboy3742

Bug report

pip includes a safety mechanism where defining a PIP_REQUIRE_VIRTUALENV environment variable will prevent accidentally installing packages into the global environment.

This can be a useful property to set in your .zprofile (or equivalent) to ensure that a virtual environment is active before using pip. However, if .zprofile defines PIP_REQUIRE_VIRTUALENV=1, this prevents the Install Certificates.command script from operating.

As a workaround, the script can be run in a local shell where the user has unset PIP_REQUIRE_VIRTUALENV; or .zprofile be temporarily modified so the script can be executed with a double click in the finder.

The Install Certificates script is a rare case where installing in the global environment is the point, so it should be resident to global definitions of PIP_REQUIRE_VIRTUALENV is defined.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    3.14bugs and security fixes
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    on Oct 12, 2026
  2. added 3 commits that reference this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15bugs and security fixes3.16new features, bugs and security fixesOS-mactype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions