"py.ini" question

Barry Scott barry at barrys-emacs.org
Mon Apr 26 13:53:45 EDT 2021



> On 26 Apr 2021, at 09:13, Gisle Vanem <gisle.vanem at gmail.com> wrote:
> 
> Thank for confirming what I suspected. And as I wrote earlier:
>  Since I'm on a 64-bit Python, a 'py -3' totally seems to ignore
>  'py.ini', unless it says:
>    [defaults]
>    python3=3.6
>    python3=3.6-32

You can prove that py.ini is ignored by using PYLAUNCH_DEBUG but I think its that you
do not have the config in the py.ini that does what you want.

As an example is here is the output I see:
C:\Users\barry>set PYLAUNCH_DEBUG=1

C:\Users\barry>py.exe -3
launcher build: 32bit
launcher executable: Console
Using local configuration file 'C:\Users\barry\AppData\Local\py.ini'
File 'C:\WINDOWS\py.ini' non-existent
Called with command line: -3
locating Pythons in 64bit registry
locate_pythons_for_key: C:\Python38.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python38.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python27.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python310.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python34.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python35.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python36.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python37.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
HKLM\SOFTWARE\Python\PythonCore\3.8\InstallPath: The system cannot find the file specified.
locate_pythons_for_key: C:\Python39.win64\python.exe is a 64bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locating Pythons in native registry
locate_pythons_for_key: C:\Python38.win64\python.exe: already found
locate_pythons_for_key: C:\Python38.win64\python.exe: already found
locate_pythons_for_key: C:\Python38.win64\python.exe: already found
locate_pythons_for_key: C:\Python38.win64\python.exe: already found
locate_pythons_for_key: C:\Python38.win32\python.exe: already found
locate_pythons_for_key: C:\Python38.win32\python.exe: already found
locate_pythons_for_key: C:\Python38.win32\python.exe: already found
locate_pythons_for_key: C:\Python38.win32\python.exe: already found
locate_pythons_for_key: C:\Python27.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python310.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python34.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python35.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python36.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python37.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: C:\Python39.win32\python.exe is a 32bit executable
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: : The system cannot find the path specified.
locate_pythons_for_key: unable to open PythonCore key in HKLM
found configured value 'python3=3.9-64' in C:\Users\barry\AppData\Local\py.ini
search for Python version '3.9-64' found 'C:\Python39.win64\python.exe'
run_child: about to run 'C:\Python39.win64\python.exe'
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr  6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

You can see in the output that it found my py.ini and use the python3=3.9-64 from it.

Barry












































More information about the Python-list mailing list