Quansight-Labs / free-threaded-compatibility

A central repository to keep track of the status of work on and support for free-threaded CPython (see PEP 703), with a focus on the scientific and ML/AI ecosystem
https://py-free-threading.github.io/
MIT License
154 stars 22 forks source link

improve installation doc #111

Closed shinyano closed 1 hour ago

shinyano commented 1 day ago

In docs/installing_cpython.md windows section, the following script:

$url = 'https://www.python.org/ftp/python/3.13.0/python-3.13.0-amd64.exe'
Invoke-WebRequest -Uri $url -OutFile 'python.exe'
python.exe /quiet Include_freethreaded=1

should be

$url = 'https://www.python.org/ftp/python/3.13.0/python-3.13.0-amd64.exe'
Invoke-WebRequest -Uri $url -OutFile 'python.exe'
.\python.exe /quiet Include_freethreaded=1                           # <- add .\ before python.exe

to execute the downloaded installer, because Windows PowerShell does not load commands from the current location by default.

Directly typing python.exe may even execute the Python version that was previously installed and added to PATH by the user.

To be more clear, we can change the name of the installer downloaded:

$url = 'https://www.python.org/ftp/python/3.13.0/python-3.13.0-amd64.exe'
Invoke-WebRequest -Uri $url -OutFile 'python-3.13.0-amd64.exe'
.\python-3.13.0-amd64.exe /quiet Include_freethreaded=1
ngoldbaum commented 23 hours ago

Makes sense to me, would you mind creating a PR with the change?

shinyano commented 12 hours ago

Sure! I'd be glad to.

lysnikolaou commented 1 hour ago

Fixed in #112!