This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: macOS installer "Install Certificates.command" fails if pip is not installed
Type: Stage: needs patch
Components: macOS Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: cryptophoto, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2022-02-01 13:28 by cryptophoto, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg412257 - (view) Author: Chris Drake (cryptophoto) Date: 2022-02-01 13:28
See https://github.com/python/pythondotorg/issues/1774#issuecomment-1025250329
msg412293 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2022-02-01 17:10
Thanks for opening the issue. From the pythondotorg issue, the output from the failed command:

    Last login: Sat May 8 17:08:01 on ttys005
    /Applications/Python\ 3.9/Install\ Certificates.command ; exit;
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LC_CTYPE = "en_AU.UTF-8.UTF-8",
    LANG = "en_AU.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    [cnd@mac ~]$ /Applications/Python\ 3.9/Install\ Certificates.command ; exit;
    -- pip install --upgrade certifi
    /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9: No module named pip
    Traceback (most recent call last):
    File "", line 44, in 
    File "", line 24, in main
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9', '-E', '-s', '-m', 'pip', 'install', '--upgrade', 'certifi']' returned non-zero exit status 1.
    logout
    
    [Process completed]

So the failure is due to pip not being installed. Install Certificates assumes pip will be available but that may not necessarily be the case, for instance, if a custom install of Python was selected and the "Install or upgrade pip" package is deselected. Install Certificates should protect itself, if nothing else, by providing a useful message.

(For the record, the "perl warnings" at the start of the terminal session are presumably coming from one of the shell startup scripts that are run automatically at the beginning of a terminal session. Install Certificates does not use perl.)
msg412296 - (view) Author: Chris Drake (cryptophoto) Date: 2022-02-01 17:21
So it looks like a dependency error in the installer then?

It obviously makes no sense for pip to required before the python installer can work - chicken-and-egg issue - the installer should install what it needs of course, which I guess includes pip if that's really needed at this stage...
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90759
2022-02-01 17:21:22cryptophotosetmessages: + msg412296
2022-02-01 17:10:35ned.deilysetversions: + Python 3.9, Python 3.10
title: Instructions do not work -> macOS installer "Install Certificates.command" fails if pip is not installed
messages: + msg412293

assignee: ned.deily
stage: needs patch
2022-02-01 13:28:01cryptophotocreate