Skip to content

pip config set ERROR: Fatal Internal error [id=2]. Please report as a bug. #13279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
tenpura-shrimp opened this issue Mar 14, 2025 · 2 comments
Open
1 task done
Labels
C: configuration Configuration management and loading type: bug A confirmed bug or unintended behavior

Comments

@tenpura-shrimp
Copy link

Description

~/Development/conversations2/pynlp azhao/downloadtime2 * which python
/opt/homebrew/opt/python@3/libexec/bin/python
~/Development/conversations2/pynlp azhao/downloadtime2 * python -m pip --version
pip 25.0 from /opt/homebrew/lib/python3.13/site-packages/pip (python 3.13)
~/Development/conversations2/pynlp azhao/downloadtime2 * rm -f ~/.pip/pip.conf ~/.config/pip/pip.conf
~/Development/conversations2/pynlp azhao/downloadtime2 * python --version
Python 3.13.2
~/Development/conversations2/pynlp azhao/downloadtime2 * python -m pip config set global.cert /opt/homebrew/etc/[email protected]/cert.pem
Writing to /Users/azhao/.config/pip/pip.conf
~/Development/conversations2/pynlp azhao/downloadtime2 * pip config list
:env:.config-file='/Users/azhao/.config/pip/pip.conf'
global.cert='/opt/homebrew/etc/[email protected]/cert.pem'
~/Development/conversations2/pynlp azhao/downloadtime2 * python -m pip config set global.index-url https://example.com/
ERROR: Fatal Internal error [id=2]. Please report as a bug.

Expected behavior

No response

pip version

25.0

Python version

3.13

OS

mac os

How to Reproduce

Run the commands and get a fatal error

~/Development/conversations2/pynlp azhao/downloadtime2 * python -m pip config set global.cert /opt/homebrew/etc/[email protected]/cert.pem
Writing to /Users/azhao/.config/pip/pip.conf
~/Development/conversations2/pynlp azhao/downloadtime2 * python -m pip config set global.index-url https://example.com/

Output

No response

Code of Conduct

@tenpura-shrimp tenpura-shrimp added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Mar 14, 2025
@tenpura-shrimp
Copy link
Author

tenpura-shrimp commented Mar 14, 2025

apparently having "PIP_CONFIG_FILE" set at all causes pip to destroy itself. That env variable just literally doesn't work?????


pip config debug
env_var:
  PIP_CONFIG_FILE='/Users/azhao/.config/pip/pip.conf'
env:
  /Users/azhao/.config/pip/pip.conf, exists: True
    global.test: test
global:
  /opt/homebrew/share/pip:/Library/Application Support/pip/pip.conf, exists: False
site:
  /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.13/pip.conf, exists: False

@ichard26
Copy link
Member

This is because the user configuration is not loaded when PIP_CONFIG_FILE is set ... which also makes it impossible for pip to modify the user configuration.

# per-user config is not loaded when env_config_file exists
should_load_user_config = not self.isolated and not (
env_config_file and os.path.exists(env_config_file)
)
if should_load_user_config:
# The legacy config file is overridden by the new config file
yield kinds.USER, config_files[kinds.USER]

It'd definitely be nicer to support writing to any configuration level even if it's not loaded (although a warning that it won't be visible would be good).

@ichard26 ichard26 added C: configuration Configuration management and loading and removed S: needs triage Issues/PRs that need to be triaged labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: configuration Configuration management and loading type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants