René's URL Explorer Experiment


Title: ensurepip warning about running pip as the root user cannot be suppressed · Issue #139363 · python/cpython · GitHub

Open Graph Title: ensurepip warning about running pip as the root user cannot be suppressed · Issue #139363 · python/cpython

X Title: ensurepip warning about running pip as the root user cannot be suppressed · Issue #139363 · python/cpython

Description: Bug report Bug description: The Github Action for installing python currently invokes ensurepip before installing pip. This all works great. It even sets PIP_ROOT_USER_ACTION=ignore to suppress the warning about root (text below), which ...

Open Graph Description: Bug report Bug description: The Github Action for installing python currently invokes ensurepip before installing pip. This all works great. It even sets PIP_ROOT_USER_ACTION=ignore to suppress the...

X Description: Bug report Bug description: The Github Action for installing python currently invokes ensurepip before installing pip. This all works great. It even sets PIP_ROOT_USER_ACTION=ignore to suppress the...

Opengraph URL: https://github.com/python/cpython/issues/139363

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ensurepip warning about running pip as the root user cannot be suppressed","articleBody":"# Bug report\n\n### Bug description:\n\nThe [Github Action for installing python](https://github.com/actions/python-versions/blob/main/installers/nix-setup-template.sh#L53) currently invokes `ensurepip` before installing pip.  This all works great.  It even sets `PIP_ROOT_USER_ACTION=ignore` to suppress the warning about root (text below), which is common when using containerized environments in CI.  However it seems that `pip` respects this environment variable while `ensurepip` does not.  In particular, https://github.com/python/cpython/blob/main/Lib/ensurepip/__init__.py#L101 seems to guarantee that `ensurepip` will honor neither environment variables nor the pip configuration file for controlling this.\n\nI have a few questions about this and didn't see a prior ticket, so here goes:\n\n* Is the Github action taking the correct approach to install Python?  (AFAICT, yes)\n* Is `ensurepip` ignoring all environment and configuration correct?  AFAICT this was added a long time ago to address some test suite issues\n* Is there any way I have missed to suppress the below message when the installer invokes `ensurepip` within a container running as root? ```WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv```\n* If there is no way, should there be?  IMO, yes.  My proposal would be to alter the sanitization to preserve this variable.  I'm happy to PR that if it is the best approach here.\n\n\n\n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\nLinux","author":{"url":"https://github.com/zvickery","@type":"Person","name":"zvickery"},"datePublished":"2025-09-26T15:05:10Z","url":"https://github.com/python/cpython/issues/139363"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:52442453-93fc-5627-036c-f7fd7f131b40
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBD30:2536B8:7DB838:A5FBBF:6AF84700
html-safe-noncecf02f2a8196d8884876ed4f475171a9e63e6e4daf8087a54f7775d390b475f4b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDMwOjI1MzZCODo3REI4Mzg6QTVGQkJGOjZBRjg0NzAwIiwidmlzaXRvcl9pZCI6IjY3ODQ2NDA5NzA3NDMwMDY3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0226101b67af768ace73be768acbef1971bac520583df7ae45f1a484adea4b24
hovercard-subject-tagissue:3458025304
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/139363/issue_layout
twitter:imagehttps://opengraph.githubassets.com/846bf0cd15ee85206c604518ccb58902548da697047d41a18456e0f7699dedec/python/cpython/issues/139363
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/846bf0cd15ee85206c604518ccb58902548da697047d41a18456e0f7699dedec/python/cpython/issues/139363
og:image:altBug report Bug description: The Github Action for installing python currently invokes ensurepip before installing pip. This all works great. It even sets PIP_ROOT_USER_ACTION=ignore to suppress the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamezvickery
hostnamegithub.com
expected-hostnamegithub.com
None5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release653be32ff5c755082a4db662491bfbbcfc9112c1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/139363#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F139363
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F139363
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/139363
Reloadhttps://github.com/python/cpython/issues/139363
Reloadhttps://github.com/python/cpython/issues/139363
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/pulse
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/139363
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/139363
ensurepip warning about running pip as the root user cannot be suppressedhttps://github.com/python/cpython/issues/139363#top
pendingThe issue will be closed if no feedback is providedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22pending%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-ensurepiphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-ensurepip%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/zvickery
zvickeryhttps://github.com/zvickery
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issue-3458025304
Github Action for installing pythonhttps://github.com/actions/python-versions/blob/main/installers/nix-setup-template.sh#L53
https://github.com/python/cpython/blob/main/Lib/ensurepip/__init__.py#L101https://github.com/python/cpython/blob/main/Lib/ensurepip/__init__.py#L101
zvickeryhttps://github.com/zvickery
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Sep 26, 2025https://github.com/python/cpython/issues/139363#event-19946475880
StanFromIrelandhttps://github.com/StanFromIreland
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-ensurepiphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-ensurepip%22
on Sep 26, 2025https://github.com/python/cpython/issues/139363#event-19946497168
https://github.com/picnixz
picnixzhttps://github.com/picnixz
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issuecomment-3339101124
https://github.com/pypa/piphttps://github.com/pypa/pip
picnixzhttps://github.com/picnixz
pendingThe issue will be closed if no feedback is providedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22pending%22
on Sep 26, 2025https://github.com/python/cpython/issues/139363#event-19946550678
https://github.com/zvickery
zvickeryhttps://github.com/zvickery
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issuecomment-3339415843
https://github.com/pypa/piphttps://github.com/pypa/pip
https://github.com/picnixz
picnixzhttps://github.com/picnixz
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issuecomment-3339482623
@pfmoorehttps://github.com/pfmoore
@pradyunsghttps://github.com/pradyunsg
https://github.com/pfmoore
pfmoorehttps://github.com/pfmoore
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issuecomment-3340276939
https://github.com/zvickery
zvickeryhttps://github.com/zvickery
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issuecomment-3340569267
standard python install actionhttps://github.com/actions/setup-python
https://github.com/picnixz
picnixzhttps://github.com/picnixz
on Sep 26, 2025https://github.com/python/cpython/issues/139363#issuecomment-3340699103
picnixzhttps://github.com/picnixz
not plannedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Sep 26, 2025https://github.com/python/cpython/issues/139363#event-19954021898
leofanghttps://github.com/leofang
on Apr 8, 2026https://github.com/python/cpython/issues/139363#event-24281628981
Revert PIP_ROOT_USER_ACTION changes (ineffective for setup-python)https://github.com/leofang/cuda-python/commit/bd7f5c094e11508a60f2363c004a67fb01f48788
bd7f5c0https://github.com/leofang/cuda-python/commit/bd7f5c094e11508a60f2363c004a67fb01f48788
Clean up CI annotations and surface sccache stats from cibuildwheel (#…https://github.com/NVIDIA/cuda-python/commit/738dbdc8420ddb75d8a71894e03afb201b6e9251
#…https://github.com/NVIDIA/cuda-python/pull/1879
738dbdchttps://github.com/NVIDIA/cuda-python/commit/738dbdc8420ddb75d8a71894e03afb201b6e9251
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/139363
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/139363
pendingThe issue will be closed if no feedback is providedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22pending%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-ensurepiphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-ensurepip%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.